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.
Deployment Commands
c2a deploy app
Deploy an application from a Git repository.
c2a deploy app <app-name> -g <git-url> [options]
Options:
| Option | Description | Default |
|---|---|---|
-g, --git-url | 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 deploy app my-api -g https://github.com/user/repo.git
# Private repo with token
c2a deploy app my-api -g https://github.com/org/private.git \
--private-repo --git-token ghp_xxx
# Private repo with saved secret
c2a deploy app my-api -g https://github.com/org/private.git \
--private-repo --git-secret my-git-creds
# With environment variables
c2a deploy app my-api -g https://github.com/user/repo.git \
-e DATABASE_URL=postgres://... \
-e LOG_LEVEL=debug
# Custom port and size
c2a deploy app my-api -g https://github.com/user/repo.git \
--port 3000 --size MEDIUM
Deployment Flow:
c2a rebuild
Trigger a rebuild for an existing application.
c2a rebuild <app-name>
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)
Example:
c2a rebuild my-api
Output:
Triggering rebuild for: my-api
Project: MyProject
============================================================
✅ Rebuild triggered successfully!
Monitor progress with:
c2a builds list
c2a logs show my-api --build
Log Commands
c2a logs show
View application or build logs.
c2a logs show <app-name> [options]
Options:
| Option | Description | Default |
|---|---|---|
-n, --lines | Number of lines | 100 |
-f, --follow | Follow log output (real-time) | false |
--build | Show build logs instead | false |
Examples:
# View last 100 lines
c2a logs show my-api
# View last 50 lines
c2a logs show my-api -n 50
# Follow logs in real-time (Ctrl+C to stop)
c2a logs show my-api -f
# View build logs
c2a logs show my-api --build
Log Flow:
Build Commands
c2a builds list
List all builds in the current project.
c2a builds list
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 builds logs
View logs for a specific build.
c2a builds logs <build-name>
Service Commands
c2a services list
List all running services with their URLs.
c2a services list
Output:
Services
┏━━━━━━━━━━━━━━━━━ ┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Service ┃ Namespace ┃ Status ┃ URL ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ my-api │ myproject │ Running │ my-api.myproject.apps.clue2.app │
│ frontend │ myproject │ Running │ frontend.myproject.apps.clue2.… │
└─────────────────┴────────────┴─────────┴─────────────────────────────────┘
Secret Commands
c2a secrets list
List all secrets in the current project.
c2a secrets list
Output:
Secrets (MyProject)
┏━━━━━━━━ ━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ Name (for --git-secret) ┃ Display Name ┃ Type ┃ Username ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩
│ my-git-creds │ my-git-creds │ git │ git │
│ docker-registry │ docker-registry │ registry │ user │
└───────────────────────────┴─────────────────────┴──────────┴──────────┘
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
Environment Variable Commands
c2a env set
Set environment variables for an application.
c2a env set <app-name> KEY=VALUE [KEY=VALUE...]
Examples:
# Set single variable
c2a env set my-api DATABASE_URL=postgresql://host/db
# Set multiple variables
c2a env set my-api \
DATABASE_URL=postgresql://host/db \
REDIS_URL=redis://host:6379 \
LOG_LEVEL=info
c2a env list
List environment variables for an application.
c2a env list <app-name>
c2a env unset
Remove environment variables.
c2a env unset <app-name> KEY [KEY...]
Project Commands
c2a projects list
List all projects you have access to.
c2a projects list
c2a projects select
Switch to a different project.
c2a projects select <project-name>
c2a projects create
Create a new project.
c2a projects create --name <name> --namespace <namespace>
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 |
Complete Workflow Examples
Example 1: Full Deployment Pipeline
# 1. Create project
c2a projects create --name Production --namespace prod
# 2. Select project
c2a projects select Production
# 3. Create git credentials
c2a secrets create git --name github-creds --username git --token ghp_xxx
# 4. Deploy application
c2a deploy app backend-api \
-g https://github.com/myorg/backend.git \
--private-repo --git-secret github-creds \
--port 8000 --size MEDIUM
# 5. Set environment variables
c2a 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 builds list
c2a logs show backend-api -f
Example 2: Debug & Fix Flow
# Check what's failing
c2a builds list
c2a builds logs my-api-build-5
# If build passed, check runtime logs
c2a logs show my-api
# Fix code and push to Git, then rebuild
c2a rebuild my-api
# Verify fix
c2a logs show my-api -f
Example 3: Multi-App Deployment
# Deploy backend
c2a deploy app backend -g https://github.com/org/backend.git
# Deploy frontend
c2a deploy app frontend -g https://github.com/org/frontend.git \
-e VITE_API_URL=https://backend.myproject.apps.clue2.app
# Deploy worker
c2a deploy app worker -g 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 projects select |
Build failed | Code/dependency issue | Check c2a builds 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