Configuration
Config Commands
Manage your CLI configuration with the config command group:
bash
namecheap config list # Show all config values
namecheap config get <key> # Get a specific value
namecheap config set <key> <value> # Set a value
namecheap config path # Show the config file pathConfig Options
| Option | Values | Description |
|---|---|---|
sandbox | true / false | Use the sandbox API for testing |
defaultOutput | table / json | Default output format |
Output Formats
Table Output (Default)
By default, all commands display results in a formatted table:
bash
namecheap domains listJSON Output
Add the --json flag to any command to get JSON output instead:
bash
namecheap domains list --jsonSetting the Default Format
If you prefer JSON output by default, set it in the config:
bash
namecheap config set defaultOutput jsonYou can still override the default with the --json flag on individual commands.
Sandbox Mode
Namecheap provides a sandbox environment for testing API calls without affecting your production account.
Enable Sandbox Mode
bash
namecheap config set sandbox trueAuthenticate with Sandbox Credentials
After enabling sandbox mode, authenticate with your sandbox account credentials:
bash
namecheap auth loginTIP
Sandbox credentials are separate from your production credentials. Create a sandbox account at sandbox.namecheap.com.
Test Commands
Once authenticated, all commands will use the sandbox API:
bash
namecheap domains listDisable Sandbox Mode
To switch back to production:
bash
namecheap config set sandbox false