CLI Reference (Detailed)
Detailed command reference for the Khaos CLI. This section provides in-depth coverage of command groups that have their own subcommands and workflows.
Main CLI reference
For a complete overview of all commands with usage examples, see the CLI Reference page.
Command Groups
- Cloud Commands — authentication, credential management, and cloud sync operations
- Scenario Commands — scenario listing, validation, and direct execution
Quick Reference
All available CLI commands at a glance:
| Command | Description | Details |
|---|---|---|
khaos discover | Register @khaosagent handlers | CLI Reference |
khaos run | Run agent with full evaluation | CLI Reference |
khaos test | Run @khaostest agent tests | CLI Reference |
khaos ci | CI/CD pipeline mode with thresholds | CLI Reference |
khaos compare | Compare two runs for regressions | CLI Reference |
khaos gate | Check if run meets quality thresholds | CLI Reference |
khaos sync | Sync results to cloud dashboard | Cloud Commands |
khaos login | Authenticate with Khaos Cloud | Cloud Commands |
khaos logout | Clear stored credentials | Cloud Commands |
khaos tokens | Manage API tokens | Cloud Commands |
khaos export | Export run artifacts as JSON bundle | CLI Reference |
khaos attacks | Inspect attack categories and details | CLI Reference |
khaos evals list | List available evaluations | CLI Reference |
khaos playground | Interactive agent testing environment | CLI Reference |
khaos doctor | Diagnose installation and configuration | CLI Reference |
Global Flags
These flags are available on all commands:
| Flag | Description |
|---|---|
--help | Show help for any command |
--version | Print the Khaos CLI version |
--install-completion | Install shell completion for the current shell |
--show-completion | Print completion script for manual setup |
See Also
- CLI Reference — main CLI reference with usage examples
- Cloud Commands — authentication and sync
- Scenario Commands — scenario management