Skip to Content
We are live but in Staging 🎉
CLI GuideCLI Basics

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:

  1. CLI flags (--api-endpoint, --token, --org)
  2. Environment variables with K3_ prefix
  3. Config keys (k3.*, then global.* fallback)
  4. 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_ENDPOINT
  • K3_TOKEN
  • K3_ORG

Global Flags

FlagDefaultMeaning
--config~/.config/dodil/config.yamlConfig file path
--output, -otableOutput format
--api-endpointapi.k3.dodil.io:443API endpoint
--tokennoneBearer token override
--orgnoneOrganization ID override
--org-namenoneOrganization name override
--debugfalseDebug mode
--timeout30sRequest timeout

Output Modes

  • Default: table-like output
  • JSON: -o json

Example:

dodil k3 bucket list -o json

Command Discovery

dodil k3 --help dodil k3 <group> --help

Next: Bucket and Object Commands