Configuration
CLI Configuration
Section titled “CLI Configuration”The ZCP CLI uses a YAML configuration file to store credential profiles.
Config file location
Section titled “Config file location”| Platform | Path |
|---|---|
| Linux/macOS | ~/.config/zcp/config.yaml |
| Windows | %APPDATA%\zcp\config.yaml |
| Custom | Set XDG_CONFIG_HOME environment variable |
Config file structure
Section titled “Config file structure”active_profile: defaultprofiles: - name: default bearer_token: 'your-token-here' api_url: 'https://api.zcp.zsoftly.ca/api' - name: staging bearer_token: 'staging-token-here' api_url: 'https://api.staging.zcp.zsoftly.ca/api'Profile management
Section titled “Profile management”# Add a new profile interactivelyzcp profile add
# List all profileszcp profile list
# Switch to a different profilezcp profile use staging
# Show the active profilezcp profile show
# Update a profile fieldzcp profile update --name default --token new-token
# Delete a profilezcp profile delete stagingEnvironment variables
Section titled “Environment variables”Environment variables override the config file. Useful for CI/CD pipelines:
| Variable | Description |
|---|---|
ZCP_BEARER_TOKEN | Authentication token |
ZCP_API_URL | API base URL |
ZCP_PROFILE | Profile to use |
ZCP_PROJECT | Default project |
ZCP_REGION | Default region |
ZCP_CLOUD_PROVIDER | Default cloud provider |
ZCP_OUTPUT | Output format (table, json, yaml) |
ZCP_DEBUG | Enable debug output (true/false) |
Global flags
Section titled “Global flags”These flags work on every command:
| Flag | Short | Default | Description |
|---|---|---|---|
--profile | Config profile to use | ||
--output | -o | table | Output format: table, json, yaml |
--api-url | Override API base URL | ||
--timeout | 30 | Request timeout in seconds | |
--debug | false | Enable debug output to stderr | |
--no-color | false | Disable color output | |
--pager | false | Pipe table output through less | |
--auto-approve | -y | false | Skip confirmation prompts |
See also: Installation, Quickstart