Skip to main content

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:

OptionDescriptionDefault
-g, --git-urlGit repository URLRequired
-b, --branchGit branchmain
--private-repoMark as private repositoryfalse
--git-tokenGit personal access token-
--git-secretName of saved git secret-
--portContainer port8080
--sizeApp size (TINY/SMALL/MEDIUM/LARGE)SMALL
-e, --envEnvironment variable (KEY=VALUE)-
--scale-to-zeroEnable scale to zerofalse

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:

OptionDescriptionDefault
-n, --linesNumber of lines100
-f, --followFollow log output (real-time)false
--buildShow build logs insteadfalse

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 successfully
  • Building - Build in progress
  • Failed - Build failed (check logs)

Build Reason:

  • COMMIT - New code pushed
  • STACK - Base image updated
  • TRIGGER - 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:

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

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

ErrorCauseSolution
Not authenticatedSession expiredRun c2a login
Project not foundWrong project contextRun c2a projects select
Build failedCode/dependency issueCheck c2a builds 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