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 projects create --name "MyProject" --namespace "myproject"
# Set it as active
c2a projects select 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 deploy app my-api -g https://github.com/clue2solve/clue2app-fastapi-demo.git
Private Repository (with token)
c2a deploy app my-api \
-g 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 deploy app my-api \
-g https://github.com/myorg/private-repo.git \
--private-repo \
--git-secret my-git-creds
Step 4: Monitor Your Deployment
Check build status:
c2a builds list
View build logs:
c2a builds logs <build-name>
Step 5: Access Your Application
Once the status shows Ready, your app is live:
# List running services with URLs
c2a services list
Your app URL: https://my-api.myproject.apps.clue2.app
Application Lifecycle
Essential Commands
Deployment & Build
| Command | Description |
|---|---|
c2a deploy app <name> -g <url> | Deploy new app from Git |
c2a rebuild <name> | Trigger a rebuild |
c2a builds list | List all builds |
c2a builds logs <build> | View build logs |
Monitoring & Logs
| Command | Description |
|---|---|
c2a logs show <app> | View application logs |
c2a logs show <app> -f | Follow logs in real-time |
c2a logs show <app> --build | View build logs |
c2a services list | List running services |
Project Management
| Command | Description |
|---|---|
c2a projects list | List all projects |
c2a projects select <name> | Switch active project |
c2a projects create | Create new project |
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 deploy app my-api -g https://github.com/user/repo.git
# Set environment variables
c2a 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 rebuild my-api
# Monitor the build
c2a builds list
# View logs once running
c2a logs show my-api -f
Workflow 3: Debug Failed Deployment
# Check build status
c2a builds list
# View build logs
c2a builds logs <build-name>
# View application logs
c2a logs show my-api
# Trigger rebuild after fixing
c2a rebuild my-api
Using Private Repositories
Option 1: Git Token (Quick)
c2a deploy app my-api \
-g 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 deploy app my-api \
-g 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 env set my-api API_KEY=secret123
# Set multiple variables
c2a env set my-api \
DATABASE_URL=postgresql://... \
REDIS_URL=redis://... \
LOG_LEVEL=info
# List current variables
c2a env list my-api
# Remove a variable
c2a env unset my-api DEBUG
Troubleshooting
Build Failed
# Check build logs
c2a builds logs <build-name>
# Common issues:
# - Missing dependencies in requirements.txt / package.json
# - Invalid Dockerfile or Procfile
# - Private dependency without credentials
App Not Accessible
# Check service status
c2a services list
# Check app logs for errors
c2a logs show my-api
Authentication Issues
# Re-authenticate
c2a login
# Check current session
c2a config show
Logs Not Working
# Ensure you're in the right project
c2a projects select MyProject
# Then view logs
c2a logs show my-api
Full Command Reference
c2a --help # Show all commands
c2a <command> --help # Show command help
c2a deploy app --help # Show deploy options
All Commands
| Category | Command | Description |
|---|---|---|
| Auth | c2a login | Authenticate |
c2a logout | Log out | |
| Projects | c2a projects list | List projects |
c2a projects select | Switch project | |
c2a projects create | Create project | |
| Deploy | c2a deploy app | Deploy application |
c2a rebuild | Trigger rebuild | |
| Apps | c2a apps list | List applications |
c2a apps delete | Delete application | |
| Builds | c2a builds list | List builds |
c2a builds logs | View build logs | |
| Logs | c2a logs show | View app logs |
c2a logs show -f | Follow logs | |
| Services | c2a services list | List services |
| Secrets | c2a secrets list | List secrets |
c2a secrets create | Create secret | |
| Env | c2a env set | Set env variables |
c2a env list | List env variables | |
| TUI | c2a tui | Interactive dashboard |
Need help? Visit our GitHub Issues or contact support.