Configure the ktm CLI
Configure ktm using environment variables and global flags like API keys, output format, and host overrides, with no config file needed.
ktm is configured through environment variables and global flags. There is no config file to manage.
Authentication
Provide your API key in one of two ways:
- Set the
KAPPTIVATE_API_KEYenvironment variable (recommended). - Pass
--api-key-file <path>to read the key from a file.
Every command needs a key except local validation (--validate). Keys are created and managed by workspace administrators under Administration > API keys.
Environment variables
| Variable | Purpose |
|---|---|
KAPPTIVATE_API_KEY | Your API key. Carries the same access as your account. |
KAPPTIVATE_HOST | API host. Defaults to app.kapptivate.com. |
Global flags
These apply to every command:
| Flag | Description |
|---|---|
-o, --output | Output format: json (default), table, or plain. |
-d, --debug | Print HTTP requests, timing, and verbose errors on stderr. |
--host | Override the API host (also KAPPTIVATE_HOST). |
--api-key-file | Read the API key from a file instead of the environment. |
-q, --quiet | Suppress info-level log lines; show errors only. |
--no-color | Disable colored output. |
--no-proxy | Ignore HTTP proxy settings from the environment. |
--skip-tls | Skip TLS certificate verification (insecure). |
Exit codes
ktm uses stable exit codes so pipelines can branch on the outcome:
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Authentication error |
3 | Timeout (poll timeout exceeded) |
4 | Invalid configuration |
5 | Tests ran but some failed |
What's next?
Last updated on