Skip to main content
DOCS

CLI

The codata command — login, MCP config, workspaces, branches, keys, data calls, and scaffolding from any terminal.

@codata-io/cli

The Codata CLI (codata) covers the whole workspace lifecycle from any terminal: login, MCP config, workspaces, branches, versions, API keys, data calls, costs, and client scaffolding.

npm install -g @codata-io/cli
# or run ad hoc
npx @codata-io/cli <command>

Authentication

codata login              # opens browser for OAuth
codata login -t <token>   # authenticate with a developer token
codata whoami             # show current user + org
codata logout             # clear stored credentials

MCP configuration

One-liner setup for VS Code, Cursor, Claude Code, and Claude Desktop:

codata init                   # auto-detect editor, write MCP config
codata init -e cursor         # target a specific editor
codata init -g                # write to global user settings
codata init -y --skip-login   # non-interactive

Workspaces

codata workspaces                    # list workspaces
codata show <name>                   # workspace details
codata create <name> -d "purpose"    # create a workspace
codata generate <workspace> -b main  # trigger generation
codata setup <workspace>             # auth + email setup status

API keys

codata keys create <workspace> -n ci-key -p read-only
codata keys list <workspace>
codata keys rotate <workspace> <keyId>   # revoke old, mint new
codata keys revoke <workspace> <keyId>

Call your API from the terminal

codata api <workspace>                       # list endpoints
codata api <workspace> GET /users -q limit=10
codata api <workspace> POST /users -d '{"name":"Alice"}'
codata api <workspace> GET /orders -b staging  # route via branch

Branches & versions

codata branches list <workspace>
codata branches create <workspace> feature-checkout -s main
codata branches merge <workspace> feature-checkout -t main

codata versions list <workspace>
codata rollback <workspace> <version>

More

codata scaffold
Generate a typed API client — -l typescript|javascript|python, -o to write to a file.
codata costs show
Cost breakdown per workspace; `codata costs aggregate` across all workspaces.
codata -P <profile>
Use a named CLI profile (multiple accounts/environments).