Skip to content

CLI Configuration

Configuration File

The CLI stores configuration in ~/.amp/config.json.

Default Configuration

{
  "api_key": null,
  "tenant_id": null,
  "api_url": "https://api.amp.dev",
  "default_output": "table",
  "color": true,
  "timeout": 30000
}

Configuration Options

Key Type Default Description
api_key string null API key for authentication
tenant_id string null Default tenant ID
api_url string https://api.amp.dev API base URL
default_output string table Output format: table, json, quiet
color boolean true Enable colored output
timeout number 30000 Request timeout in ms

Environment Variables

Environment variables override config file values.

Variable Config Key Description
AMP_API_KEY api_key API key
AMP_TENANT_ID tenant_id Tenant ID
AMP_API_URL api_url API URL
NO_COLOR color Disable color (set to any value)

Managing Configuration

View All Settings

amp config list

Get Specific Value

amp config get api_url

Set Value

amp config set default_output json
amp config set timeout 60000

Reset to Default

amp config reset

Multiple Profiles

Create Profile

amp config profile create production --api-key amp_live_xxx
amp config profile create staging --api-key amp_test_xxx --api-url https://staging.api.amp.dev

Switch Profile

amp config profile use production

List Profiles

amp config profile list

Shell Completion

Bash

amp completion bash >> ~/.bashrc
source ~/.bashrc

Zsh

amp completion zsh >> ~/.zshrc
source ~/.zshrc

Fish

amp completion fish > ~/.config/fish/completions/amp.fish