Skip to main content

CLI Reference

Complete reference for all Clue2App CLI commands with examples and workflows.

Install

pip install clue2app-cli
c2a login
c2a config show # confirm which backend you're pointed at

For a self-hosted or dedicated backend, override the defaults before c2a login:

c2a config set api.base_url https://coordinator.YOUR-BACKEND.example.com
c2a config set auth.base_url https://auth.YOUR-BACKEND.example.com

To drive these same commands from an AI assistant, add the MCP server — see the MCP Quick Start. MCP-only users can install pip install clue2app-mcp on its own. See the CLI Quick Start for the end-to-end first-deploy walkthrough.

How It Works

Push code → Get a running app. That's it.


Global Options

c2a [OPTIONS] COMMAND [ARGS]...
OptionDescription
--versionShow version and exit
--debugEnable debug mode
-v, --verboseEnable verbose output

App Commands

c2a app create

Deploy an application from a Git repository.

c2a app create <app-name> --git-url <git-url> [options]

Options:

OptionDescriptionDefault
-g, --git-urlGit repository URLRequired
-b, --branchGit branchmain
-p, --projectProject name (overrides active project)active project
--private-repoMark as private repositoryfalse
--git-tokenGit token/password for private repos-
--git-userGit username for private repos-
--git-secretName of existing saved Git secret-
--portContainer port8080
--sizeApp size (TINY/SMALL/MEDIUM/LARGE)SMALL
-e, --envEnvironment variable (KEY=VALUE, repeatable)-
-s, --secretSecret variable (KEY=VALUE, repeatable)-
--scale-to-zeroEnable scale to zerofalse
--no-deployBuild only, do not deploy the Knative servicefalse
--skip-entry-checkSkip pre-flight check for a web entry pointfalse

Examples:

# Simple public repo
c2a app create my-api --git-url https://github.com/user/repo.git

# Private repo with token
c2a app create my-api --git-url https://github.com/org/private.git \
--private-repo --git-token ghp_xxx

# Private repo with saved secret
c2a app create my-api --git-url https://github.com/org/private.git \
--private-repo --git-secret my-git-creds

# With environment variables
c2a app create my-api --git-url https://github.com/user/repo.git \
-e DATABASE_URL=postgres://... \
-e LOG_LEVEL=debug

# Custom port and size
c2a app create my-api --git-url https://github.com/user/repo.git \
--port 3000 --size MEDIUM

Deployment Flow:


c2a app list

List applications with build and service status.

c2a app list # Apps in active project
c2a app list -p my-project # Apps in a specific project
c2a app list -a # Apps across all projects
OptionDescription
-p, --projectProject name (overrides active project)
-a, --allShow across all projects

c2a app show

Show combined application details — build info, service URL, and status.

c2a app show my-api
c2a app show my-api -f url # Show only the service URL
OptionDescription
-f, --fieldShow a specific field (e.g., url)

c2a app logs

View runtime logs for an application.

c2a app logs my-api
c2a app logs my-api -n 200 # Last 200 lines
OptionDescription
-n, --linesNumber of log lines (default: 100)

c2a app rebuild

Trigger a rebuild for an existing application.

c2a app rebuild my-api

When to use:

  • After pushing code changes to Git
  • To pick up base image updates
  • To retry a failed build
  • To rebuild without code changes (e.g., security patches)

c2a app restart

Restart a running application without rebuilding.

c2a app restart my-api

c2a app delete

Delete an application and its associated resources.

c2a app delete my-api

c2a app env set

Set environment variables for an application.

c2a app env set my-api KEY=VALUE [KEY=VALUE...]

Examples:

# Set single variable
c2a app env set my-api DATABASE_URL=postgresql://host/db

# Set multiple variables
c2a app env set my-api \
DATABASE_URL=postgresql://host/db \
REDIS_URL=redis://host:6379 \
LOG_LEVEL=info

c2a app env list

List environment variables for an application.

c2a app env list my-api

c2a app env unset

Remove environment variables.

c2a app env unset my-api KEY [KEY...]

c2a app describe

Show detailed application info (build, service, pods, revisions).

c2a app describe my-api

c2a app bindings

List service bindings attached to an app.

c2a app bindings my-api

c2a app unbind

Remove a service binding from an app.

c2a app unbind my-api <binding-name>

c2a app sa-secrets

Manage the app's service-account image-pull secrets.

c2a app sa-secrets my-api

c2a app autoscale

Configure autoscaling for an app (min/max instances, scale-to-zero).

c2a app autoscale my-api --min 1 --max 10

c2a app audit

Show the app's change audit trail (who changed what, when).

c2a app audit my-api

Build Commands

c2a build list

List all builds in the current project.

c2a build list # All builds
c2a build list my-api # Builds for a specific app
c2a build list -p my-project # Builds in a specific project

Output:

Builds
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┓
┃ Image ┃ Latest Build ┃ Status ┃ Reason ┃ Build # ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━┩
│ my-api-image │ 1234567890-my-api-… │ Success │ COMMIT │ 12 │
│ frontend-image │ 1234567891-front-… │ Success │ STACK │ 8 │
└────────────────┴─────────────────────┴─────────┴────────┴─────────┘

Build Status:

  • Success - Build completed successfully
  • Building - Build in progress
  • Failed - Build failed (check logs)

Build Reason:

  • COMMIT - New code pushed
  • STACK - Base image updated
  • TRIGGER - Manual rebuild

c2a build logs

View build logs for an application.

c2a build logs my-api
c2a build logs my-api -n 200
OptionDescription
-n, --linesNumber of log lines (default: 100)

c2a build history

Show build history for a specific application.

c2a build history my-api

Project Commands

c2a project list

List all projects you have access to.

c2a project list

c2a project use

Switch to a different project.

c2a project use MyProject

c2a project create

Create a new project.

c2a project create MyProject

c2a project show

Show project details.

c2a project show MyProject

User Commands

c2a user list

List all users in the current account.

c2a user list

c2a user invite

Invite a new user by email. Email is required. Passing one or more --project/-P flags switches to the invite-by-email flow (no password needed; the user completes signup on first OAuth login). The invitee lands in the project's owning account, not the caller's account — pass -a/--account to override.

# Invite into a project as CONTRIBUTOR (default role)
c2a user invite -e alice@corp.com -P clues -r CONTRIBUTOR

# Invite as PROJECT_ADMIN across multiple projects
c2a user invite -e bob@corp.com -P clues -P entrada -r PROJECT_ADMIN

# Explicit account (needed when projects span multiple accounts)
c2a user invite -e ops@corp.com -P clues -r VIEWER -a <account-uuid>

# Legacy LOCAL user create (no project grants; requires password)
c2a user invite -u john -e john@example.com -p pass123

Options:

OptionDescriptionDefault
-e, --emailEmail addressRequired
-u, --usernameUsername (LOCAL create only)-
-p, --passwordPassword (LOCAL create only)-
-P, --projectProject name or UUID (repeatable). Switches to invite-by-email flow.-
-r, --roleProject role: PROJECT_ADMIN, CONTRIBUTOR, VIEWERCONTRIBUTOR
-a, --accountExplicit account UUID (overrides project's owning account)-
--account-roleAccount role: ACCOUNT_ADMIN, MEMBERMEMBER
--can-create-projectsAllow invitee to create new projectsfalse
-G, --groupGroup ID to add user to (repeatable)-
-g, --given-nameFirst name-
-f, --family-nameLast name-
-s, --sourceAuth source: LOCAL, GOOGLE, GITHUBLOCAL

c2a user remove

Remove a user by ID.

c2a user remove USER_ID

c2a user groups

List all groups in the current account.

c2a user groups

c2a user roles

List all available roles.

c2a user roles

Domain Commands

c2a domain register

Register a custom domain for your project.

c2a domain register example.com # CNAME_ONLY (default)
c2a domain register example.com --method DELEGATION # Full DNS delegation (recommended)
c2a domain register app.example.com --method DELEGATION # Subdomain zone

Options: --method DELEGATION|CNAME_ONLY, --project <name>

c2a domain add

Add one or more custom domains to an app. Auto-registers the base domain if not already registered.

c2a domain add --app myapi api.example.com
c2a domain add --app frontend www.example.com admin.example.com
c2a domain add --app myapi api.example.com --method DELEGATION

Options: --app <name> (required), --method DELEGATION|CNAME_ONLY, --no-wait, --project <name>

c2a domain info

Show domain details and reprint NS record setup instructions.

c2a domain info example.com

c2a domain verify

Verify NS records are correctly configured for a DELEGATION domain via live DNS lookup.

c2a domain verify example.com

c2a domain list

List available domains (platform and project domains).

c2a domain list
c2a domain list --format json

Options: --project <name>, --format table|json

c2a domain assignments

List all domain assignments in the current project.

c2a domain assignments
c2a domain assignments --app myapi

Options: --app <name>, --project <name>, --format table|json

c2a domain status

Check DNS delegation status for a domain (via API).

c2a domain status example.com

c2a domain assign

Assign a subdomain to an application (low-level — prefer domain add).

c2a domain assign api --app myapi --domain example.com

c2a domain unassign

Remove a domain assignment from an application.

c2a domain unassign api.example.com

c2a domain delete

Delete a registered custom domain and all its assignments.

c2a domain delete example.com

Options: --yes (skip confirmation)

See the Custom Domains guide for detailed setup instructions.


Secret Commands

c2a secrets list

List all secrets in the current project.

c2a secrets list

c2a secrets create git

Create a Git secret for private repositories.

c2a secrets create git --name <name> --username <user> --token <token>

Example:

c2a secrets create git \
--name my-git-creds \
--username git \
--token ghp_xxxxxxxxxxxx

c2a secrets delete

Delete a secret by name.

c2a secrets delete <name>

LLM Commands

Manage per-project Daari LLM Gateway instances. See the Daari Secrets guide for how bindings are injected.

c2a llm list

List LLM Gateway instances in the current project.

c2a llm list
c2a llm list --format json

c2a llm create

Create a per-project LLM Gateway instance. Mints a per-project JWT and writes an OPENAI_API_KEY + OPENAI_BASE_URL binding secret in the project namespace.

c2a llm create <name>

c2a llm bind

Bind an LLM Gateway secret to an app's service-binding. The binding takes effect immediately (unless --no-restart).

c2a llm bind <app-name> <binding-name>
c2a llm bind <app-name> <binding-name> --no-restart
c2a llm bind <app-name> <binding-name> --dry-run

Daari Secrets Commands

Manage secrets in Daari Secrets Manager (spec locked 2026-06-08). Distinct from c2a secrets, which manages Git/pull-secrets.

c2a daari secrets list

List Daari-managed secrets in the current project.

c2a daari secrets list
c2a daari secrets list --format json

c2a daari secrets show

Show a secret's non-sensitive metadata by K8s name.

c2a daari secrets show <k8s-name>

c2a daari secrets create

Create a Daari secret from literal values.

c2a daari secrets create <display-name> \
--from-literal KEY=VALUE \
--from-literal KEY2=VALUE2

c2a daari secrets rotate

Rotate a secret's values.

c2a daari secrets rotate <k8s-name> --from-literal KEY=NEW_VALUE

c2a daari secrets delete

Delete a Daari secret. Use --force to skip binding checks; --yes to skip confirmation.

c2a daari secrets delete <k8s-name>

c2a daari secrets bindings

List apps that reference a Daari secret.

c2a daari secrets bindings <k8s-name>

c2a daari secrets bind

Bind a Daari secret to an app's service-binding (see service binding architecture for the underlying contract).

c2a daari secrets bind <app-name> <k8s-name>
c2a daari secrets bind <app-name> <k8s-name> --no-restart --dry-run

Interactive TUI

c2a tui

Launch the interactive terminal dashboard.

c2a tui [options]

Options:

OptionDescriptionDefault
--backendTUI backend (textual/curses)curses
--screenInitial screen (apps/projects)apps

Keyboard Shortcuts:

KeyAction
j / Move down
k / Move up
EnterSelect / View details
lView logs
rTrigger rebuild
dDelete (with confirm)
pSwitch project
/Search / Filter
?Show help
qQuit

Utility Commands

c2a analyze

Analyze a repository before deployment. Checks for common issues like missing start scripts or Procfiles.

c2a analyze # Analyze current directory
c2a analyze /path/to/repo

c2a audit

Run the PreBuildAudit ruleset (committed secrets, hardcoded credentials, private keys) against a Git ref. Exits non-zero when criticals are present — useful as a CI gate before c2a app create/rebuild.

c2a audit https://github.com/me/my-app
c2a audit https://github.com/me/my-app -r develop
c2a audit https://github.com/org/private --username me --token ghp_xxx
c2a audit https://github.com/me/my-app --json

c2a status

Show authentication and connection status, including the active project.

c2a status

c2a version

Show the CLI version.

c2a version

c2a rebuild

Top-level shortcut for c2a app rebuild.

c2a rebuild my-api

c2a restart

Top-level shortcut for c2a app restart.

c2a restart my-api

Complete Workflow Examples

Example 1: Full Deployment Pipeline

# 1. Create project
c2a project create Production

# 2. Select project
c2a project use Production

# 3. Create git credentials
c2a secrets create git --name github-creds --username git --token ghp_xxx

# 4. Deploy application
c2a app create backend-api \
--git-url https://github.com/myorg/backend.git \
--private-repo --git-secret github-creds \
--port 8000 --size MEDIUM

# 5. Set environment variables
c2a app env set backend-api \
DATABASE_URL=postgresql://user:pass@host/db \
REDIS_URL=redis://host:6379 \
SECRET_KEY=your-secret-key

# 6. Monitor deployment
c2a build list
c2a app logs backend-api

Example 2: Debug & Fix Flow

# Check what's failing
c2a build list
c2a build logs my-api

# If build passed, check runtime logs
c2a app logs my-api

# Fix code and push to Git, then rebuild
c2a app rebuild my-api

# Verify fix
c2a app logs my-api

Example 3: Multi-App Deployment

# Deploy backend
c2a app create backend --git-url https://github.com/org/backend.git

# Deploy frontend
c2a app create frontend --git-url https://github.com/org/frontend.git \
-e VITE_API_URL=https://backend.myproject.apps.clue2.app

# Deploy worker
c2a app create worker --git-url https://github.com/org/worker.git \
--scale-to-zero

Error Reference

ErrorCauseSolution
Not authenticatedSession expiredRun c2a login
Project not foundWrong project contextRun c2a project use
Build failedCode/dependency issueCheck c2a build logs
424 Failed DependencyBackend service issueRetry or contact support
Secret not foundInvalid secret nameCheck c2a secrets list

Need help? Run c2a --help or visit GitHub Issues