CLI Reference
Complete reference for all Clue2App CLI commands with examples and workflows.
How It Works
Push code → Get a running app. That's it.
Global Options
c2a [OPTIONS] COMMAND [ARGS]...
| Option | Description |
|---|---|
--version | Show version and exit |
--debug | Enable debug mode |
-v, --verbose | Enable verbose output |
App Commands
c2a app create
Deploy an application from a Git repository.
c2a app create <app-name> --git <git-url> [options]
Options:
| Option | Description | Default |
|---|---|---|
--git | Git repository URL | Required |
-b, --branch | Git branch | main |
--private-repo | Mark as private repository | false |
--git-token | Git personal access token | - |
--git-secret | Name of saved git secret | - |
--port | Container port | 8080 |
--size | App size (TINY/SMALL/MEDIUM/LARGE) | SMALL |
-e, --env | Environment variable (KEY=VALUE) | - |
--scale-to-zero | Enable scale to zero | false |
Examples:
# Simple public repo
c2a app create my-api --git https://github.com/user/repo.git
# Private repo with token
c2a app create my-api --git https://github.com/org/private.git \
--private-repo --git-token ghp_xxx
# Private repo with saved secret
c2a app create my-api --git https://github.com/org/private.git \
--private-repo --git-secret my-git-creds
# With environment variables
c2a app create my-api --git https://github.com/user/repo.git \
-e DATABASE_URL=postgres://... \
-e LOG_LEVEL=debug
# Custom port and size
c2a app create my-api --git 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
| Option | Description |
|---|---|
-p, --project | Project name (overrides active project) |
-a, --all | Show 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
| Option | Description |
|---|---|
-f, --field | Show 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
| Option | Description |
|---|---|
-n, --lines | Number 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...]
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 successfullyBuilding- Build in progressFailed- Build failed (check logs)
Build Reason:
COMMIT- New code pushedSTACK- Base image updatedTRIGGER- Manual rebuild
c2a build logs
View build logs for an application.
c2a build logs my-api
c2a build logs my-api -n 200
| Option | Description |
|---|---|
-n, --lines | Number 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.
c2a user invite user@example.com
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
Interactive TUI
c2a tui
Launch the interactive terminal dashboard.
c2a tui [options]
Options:
| Option | Description | Default |
|---|---|---|
--backend | TUI backend (textual/curses) | curses |
--screen | Initial screen (apps/projects) | apps |
Keyboard Shortcuts:
| Key | Action |
|---|---|
j / ↓ | Move down |
k / ↑ | Move up |
Enter | Select / View details |
l | View logs |
r | Trigger rebuild |
d | Delete (with confirm) |
p | Switch project |
/ | Search / Filter |
? | Show help |
q | Quit |
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 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 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 https://github.com/org/backend.git
# Deploy frontend
c2a app create frontend --git https://github.com/org/frontend.git \
-e VITE_API_URL=https://backend.myproject.apps.clue2.app
# Deploy worker
c2a app create worker --git https://github.com/org/worker.git \
--scale-to-zero
Error Reference
| Error | Cause | Solution |
|---|---|---|
Not authenticated | Session expired | Run c2a login |
Project not found | Wrong project context | Run c2a project use |
Build failed | Code/dependency issue | Check c2a build logs |
424 Failed Dependency | Backend service issue | Retry or contact support |
Secret not found | Invalid secret name | Check c2a secrets list |
Need help? Run c2a --help or visit GitHub Issues