Skip to content

Config

Manage CLI configuration settings. Configuration is stored in a JSON file at an OS-appropriate location.

Available Settings

KeyValuesDescription
sandboxtrue / falseUse the Namecheap sandbox API for testing
defaultOutputtable / jsonDefault output format for all commands

list

Display all current configuration values, including credentials (API key is hidden).

Usage:

bash
namecheap config list [options]

Options:

OptionDescription
--jsonOutput as JSON

Example:

bash
$ namecheap config list

Configuration

  Config file: /home/myuser/.config/namecheap-cli/config.json

  sandbox:       false
  defaultOutput: table

Credentials
  apiUser:  myuser
  userName: myuser
  clientIp: 203.0.113.42
  apiKey:   ***hidden***

Example (JSON):

bash
$ namecheap config list --json
{
  "sandbox": false,
  "defaultOutput": "table",
  "configPath": "/home/myuser/.config/namecheap-cli/config.json",
  "credentials": {
    "apiUser": "myuser",
    "userName": "myuser",
    "clientIp": "203.0.113.42",
    "apiKey": "***hidden***"
  }
}

get

Get a single configuration value.

Usage:

bash
namecheap config get <key>

Arguments:

ArgumentDescription
keyConfiguration key (sandbox, defaultOutput)

Example:

bash
$ namecheap config get sandbox
false
bash
$ namecheap config get defaultOutput
table

set

Set a configuration value.

Usage:

bash
namecheap config set <key> <value>

Arguments:

ArgumentDescription
keyConfiguration key (sandbox, defaultOutput)
valueValue to set

Example:

bash
$ namecheap config set sandbox true
 Set sandbox = true
bash
$ namecheap config set defaultOutput json
 Set defaultOutput = json

path

Display the path to the configuration file on disk.

Usage:

bash
namecheap config path

Example:

bash
$ namecheap config path
/home/myuser/.config/namecheap-cli/config.json

TIP

The config file is stored at ~/.config/namecheap-cli/config.json on all platforms.

Released under the MIT License.