Codag
CLI reference

CLI reference

Every command the codag binary ships, and the environment variables that shape them.

One binary, a handful of commands. codag setup is the only one you need to get started; the rest inspect or reverse what setup did.

Everyday commands

  • codag setup: authenticate and attach Codag to supported coding agents.
  • codag status: show agent connection and workspace status.
  • codag savings: show measured agent-token savings and estimated dollar savings.
  • codag doctor: verify authentication, service health, and safe proxy configuration.
  • codag disable: detach Codag from installed agents.
  • codag uninstall: detach and remove the local service and its data.

Auth and configuration

  • codag auth login / codag auth logout: browser sign-in and sign-out.
  • codag auth status / codag whoami: show the current sign-in state.
  • codag config set|get|show: manage CLI settings such as api-key and telemetry.
  • codag update: check for a newer release. Updates are signed, applied atomically, health-checked, and rolled back on failure.
  • codag version: print the installed version.
  • codag help-llm: print an agent-friendly usage document.

Environment variables

  • CODAG_API_KEY: workspace API key (cdk_ prefix) for CI and noninteractive setup.
  • CODAG_TELEMETRY=0: turn off optional product telemetry. Required contentless accounting stays on; it is how usage and savings are measured.
  • CODAG_REQUIRE_ATTESTATION=1: make GitHub artifact attestation verification mandatory during install and update.
  • CODAG_VERSION=vX.Y.Z: pin a specific release at install time, for managed environments.

Failure behavior

Codag fails open. If the local service is unreachable, a reduction times out, validation fails, or your quota is exhausted, your agent receives the original tool output byte for byte. A broken Codag never means a broken session.