CLI Quick Start
Deploy your first application using the Clue2App CLI in under 5 minutes.
Prerequisites
- Python 3.9 or higher
- Git installed
- A GitHub account (for accessing repositories)
Installation
Install the Clue2App CLI using pip:
pip install clue2app-cli
Verify the installation:
c2a --version
Quick Deploy Flow
Step 1: Login
Authenticate with your Clue2App account:
c2a login
This opens a browser window for authentication. After logging in, you'll see:
✅ Login successful!
Welcome, your-email@example.com
Step 2: Create & Select a Project
Projects organize your applications and determine where they're deployed.
# Create a new project
c2a project create MyProject
# Set it as active
c2a project use MyProject
Namespace Rules
- Namespaces must be lowercase
- Use only letters, numbers, and hyphens
- The namespace appears in your app URLs:
https://appname.myproject.apps.clue2.app
Step 3: Deploy Your Application
Public Repository
c2a app create my-api --git https://github.com/clue2solve/clue2app-fastapi-demo.git
Private Repository (with token)
c2a app create my-api \
--git https://github.com/myorg/private-repo.git \
--private-repo \
--git-token ghp_xxxxxxxxxxxx
Private Repository (with saved secret)
# First, create a git secret (one-time)
c2a secrets create git --name my-git-creds --username git --token ghp_xxxx
# Then use it for deployments
c2a app create my-api \
--git https://github.com/myorg/private-repo.git \
--private-repo \
--git-secret my-git-creds
Step 4: Monitor Your Deployment
Check build status:
c2a build list
View build logs:
c2a build logs my-api
Step 5: Access Your Application
Once the status shows Ready, your app is live:
# Show app details including URL
c2a app show my-api
# Or list all apps with status
c2a app list
Your app URL: https://my-api.myproject.apps.clue2.app
Application Lifecycle
Essential Commands
App Management
| Command | Description |
|---|---|
c2a app create <name> --git <url> | Deploy new app from Git |
c2a app list | List apps with status and URLs |
c2a app show <name> | Show app details |
c2a app logs <name> | View runtime logs |
c2a app rebuild <name> | Trigger a rebuild |
c2a app restart <name> | Restart without rebuilding |
c2a app delete <name> | Delete an app |
Build & Logs
| Command | Description |
|---|---|
c2a build list | List all builds |
c2a build logs <name> | View build logs |
c2a build history <name> | Build history for an app |
Environment Variables
| Command | Description |
|---|---|
c2a app env set <name> K=V | Set env variables |
c2a app env list <name> | List env variables |
c2a app env unset <name> K | Remove env variables |
Project Management
| Command | Description |
|---|---|
c2a project list | List all projects |
c2a project use <name> | Switch active project |
c2a project create <name> | Create new project |
c2a project show <name> | Show project details |
Secrets Management
| Command | Description |
|---|---|
c2a secrets list | List all secrets |
c2a secrets create git | Create Git credentials |
c2a secrets delete <name> | Delete a secret |
Interactive TUI Mode
Launch the interactive terminal dashboard (k9s-style):
c2a tui
┌─ Clue2App TUI ──────────────────────────── Project: MyProject ─┐
│ │
│ APPS │
│ ───────────────────────────────────────────────────────────── │
│ NAME STATUS PODS LAST BUILD │
│ ───────────────────────────────────────────────────────────── │
│▶ my-api Running 2 ✓ Success │
│ frontend Running 1 ✓ Success │
│ worker Scaled 0 ✓ Success │
│ │
├─────────────────────────────────────────────────────────────────┤
│ [Enter] Details [l] Logs [r] Rebuild [d] Delete [q] Quit │
└─────────────────────────────────────────────────────────────────┘
Keyboard shortcuts:
j/kor arrows - NavigateEnter- View detailsl- View logsr- Trigger rebuildq- Quit
Common Workflows
Workflow 1: Deploy with Database
# Deploy app
c2a app create my-api --git https://github.com/user/repo.git
# Set environment variables
c2a app env set my-api DATABASE_URL=postgresql://user:pass@host/db
# App automatically restarts with new config
Workflow 2: Update & Rebuild
# Push code changes to Git, then:
c2a app rebuild my-api
# Monitor the build
c2a build list
# View logs once running
c2a app logs my-api
Workflow 3: Debug Failed Deployment
# Check build status
c2a build list
# View build logs
c2a build logs my-api
# View application runtime logs
c2a app logs my-api
# Trigger rebuild after fixing
c2a app rebuild my-api
Using Private Repositories
Option 1: Git Token (Quick)
c2a app create my-api \
--git https://github.com/org/private.git \
--private-repo \
--git-token ghp_xxxxxxxxxxxx
Option 2: Saved Secret (Recommended)
# Create secret once
c2a secrets create git --name my-creds --username git --token ghp_xxxx
# Use for all deployments
c2a app create my-api \
--git https://github.com/org/private.git \
--private-repo \
--git-secret my-creds
Creating a GitHub Token
- Go to GitHub Settings → Developer settings → Personal access tokens
- Click "Generate new token"
- Set permissions:
- Contents: Read-only
- Metadata: Read-only
- Copy the token immediately
Keep Your Token Secure
- Never commit tokens to your repository
- Use
--git-secretfor repeated deployments - Rotate tokens periodically
Environment Variables
Set environment variables for your applications:
# Set single variable
c2a app env set my-api API_KEY=secret123
# Set multiple variables
c2a app env set my-api \
DATABASE_URL=postgresql://... \
REDIS_URL=redis://... \
LOG_LEVEL=info
# List current variables
c2a app env list my-api
# Remove a variable
c2a app env unset my-api DEBUG
Custom Domains
# Register a domain for your project
c2a domain register example.com
# Check DNS delegation status
c2a domain status example.com
# Assign a subdomain to your app
c2a domain assign my-api api.example.com
Troubleshooting
Build Failed
# Check build logs
c2a build logs my-api
# Common issues:
# - Missing dependencies in requirements.txt / package.json
# - Invalid Dockerfile or Procfile
# - Private dependency without credentials
App Not Accessible
# Check app status and URL
c2a app show my-api
# Check app logs for errors
c2a app logs my-api
Authentication Issues
# Re-authenticate
c2a login
# Check current session
c2a status
Logs Not Working
# Ensure you're in the right project
c2a project use MyProject
# Then view logs
c2a app logs my-api
Full Command Reference
c2a --help # Show all commands
c2a <command> --help # Show command help
c2a app create --help # Show deploy options
All Commands
| Category | Command | Description |
|---|---|---|
| Auth | c2a login | Authenticate |
c2a logout | Log out | |
c2a status | Connection status | |
| App | c2a app list | List applications |
c2a app create | Deploy application | |
c2a app show | App details + URL | |
c2a app logs | Runtime logs | |
c2a app delete | Delete application | |
c2a app rebuild | Trigger rebuild | |
c2a app restart | Restart service | |
c2a app env set | Set env variables | |
c2a app env list | List env variables | |
c2a app env unset | Remove env variables | |
| Build | c2a build list | List builds |
c2a build logs | View build logs | |
c2a build history | Build history | |
| Project | c2a project list | List projects |
c2a project use | Switch project | |
c2a project create | Create project | |
| Domain | c2a domain register | Register domain |
c2a domain assign | Assign to app | |
c2a domain status | Check DNS | |
| Secrets | c2a secrets list | List secrets |
c2a secrets create | Create secret | |
| TUI | c2a tui | Interactive dashboard |
Need help? Visit our GitHub Issues or contact support.