CLI Basics
K3 runs as a plugin under Dodil CLI:
dodil k3 <command> [subcommand] [flags]Auth and Config
Login once at Dodil CLI level:
dodil login <service_account_id> <service_account_secret>Default config file:
~/.config/dodil/config.yaml
K3 resolution order for key values:
- CLI flags (
--api-endpoint,--token,--org) - Environment variables with
K3_prefix - Config keys (
k3.*, thenglobal.*fallback) - Hardcoded defaults
After dodil login, you can usually run K3 commands without passing --api-endpoint, --token, or --org because these values are resolved from config.
Useful environment variables:
K3_API_ENDPOINTK3_TOKENK3_ORG
Global Flags
| Flag | Default | Meaning |
|---|---|---|
--config | ~/.config/dodil/config.yaml | Config file path |
--output, -o | table | Output format |
--api-endpoint | api.k3.dodil.io:443 | API endpoint |
--token | none | Bearer token override |
--org | none | Organization ID override |
--org-name | none | Organization name override |
--debug | false | Debug mode |
--timeout | 30s | Request timeout |
Output Modes
- Default: table-like output
- JSON:
-o json
Example:
dodil k3 bucket list -o jsonCommand Discovery
dodil k3 --help
dodil k3 <group> --help