Octopus
1.x
Open

Reading1 min
Updated31 Jul 2026
Sourcev1/cli/index.mdx

CLI

Octopus ships as a single binary, octopus. Everything — running the gateway, validating configuration, generating clients, and emitting Kubernetes CRDs — is a subcommand.

Commands01

CommandPurpose
octopus serveStart the gateway.
octopus validateLoad and validate configuration without starting the server.
octopus genGenerate config, JSON schema, and a TypeScript client from API specs.
octopus crdPrint the Octopus CRD definitions as YAML (pipe to kubectl apply -f -).
octopus versionPrint version information.

Configuration loading02

serve and validate take one or more -c/--config paths. Each may be a file or a directory:

# single file
octopus serve -c config.yaml

# multiple files, merged in order (later files override earlier ones)
octopus serve -c base.yaml -c prod.yaml

# a directory — all *.yaml, *.yml, *.json, *.toml files are merged in sorted order
octopus serve -c ./config.d/

serve also accepts -l/--log-level (trace, debug, info, warn, error; default info).

octopus serve -c config.yaml --log-level debug

In this section03

  • Codegen — a deep dive into octopus gen: service specs, generated config and JSON schema, and the TypeScript client with TanStack Query hooks.