This document covers terminal-only usage of Auto Claude. For most users, we recommend using the Desktop UI instead - it provides a better experience with visual task management, progress tracking, and automatic Python environment setup.
- You prefer terminal workflows
- You're running on a headless server
- You're integrating Auto Claude into scripts or CI/CD
- Python 3.9+
- Claude Code CLI (
npm install -g @anthropic-ai/claude-code)
Windows:
winget install Python.Python.3.12macOS:
brew install python@3.12Linux (Ubuntu/Debian):
sudo apt install python3.12 python3.12-venvLinux (Fedora):
sudo dnf install python3.12Step 1: Navigate to the backend directory
cd apps/backendStep 2: Set up Python environment
# Using uv (recommended)
uv venv && uv pip install -r requirements.txt
# Or using standard Python
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txtStep 3: Configure environment
cp .env.example .env
# Get your OAuth token
claude setup-token
# Add the token to apps/backend/.env
# CLAUDE_CODE_OAUTH_TOKEN=your-token-hereAll commands below should be run from the apps/backend/ directory:
# Activate the virtual environment (if not already active)
source .venv/bin/activate
# Create a spec interactively
python runners/spec_runner.py --interactive
# Or with a task description
python runners/spec_runner.py --task "Add user authentication with OAuth"
# Force a specific complexity level
python runners/spec_runner.py --task "Fix button color" --complexity simple
# Continue an interrupted spec
python runners/spec_runner.py --continue 001-featureThe spec runner automatically assesses task complexity:
| Tier | Phases | When Used |
|---|---|---|
| SIMPLE | 3 | 1-2 files, single service, no integrations (UI fixes, text changes) |
| STANDARD | 6 | 3-10 files, 1-2 services, minimal integrations (features, bug fixes) |
| COMPLEX | 8 | 10+ files, multiple services, external integrations |
# List all specs and their status
python run.py --list
# Run a specific spec
python run.py --spec 001
python run.py --spec 001-feature-name
# Limit iterations for testing
python run.py --spec 001 --max-iterations 5After all chunks are complete, QA validation runs automatically:
# Skip automatic QA
python run.py --spec 001 --skip-qa
# Run QA validation manually
python run.py --spec 001 --qa
# Check QA status
python run.py --spec 001 --qa-statusThe QA validation loop:
- QA Reviewer checks all acceptance criteria
- If issues found → creates
QA_FIX_REQUEST.md - QA Fixer applies fixes
- Loop repeats until approved (up to 50 iterations)
Auto Claude uses Git worktrees for isolated builds:
# Test the feature in the isolated workspace
cd .worktrees/auto-claude/
npm run dev # or your project's run command
# Return to backend directory to run management commands
cd apps/backend
# See what was changed
python run.py --spec 001 --review
# Merge changes into your project
python run.py --spec 001 --merge
# Discard if you don't like it
python run.py --spec 001 --discardWhile the agent is running:
# Pause and add instructions
Ctrl+C (once)
# Exit immediately
Ctrl+C (twice)File-based alternative:
# Create PAUSE file to pause after current session
touch specs/001-name/PAUSE
# Add instructions
echo "Focus on fixing the login bug first" > specs/001-name/HUMAN_INPUT.mdpython validate_spec.py --spec-dir specs/001-feature --checkpoint allCopy .env.example to .env and configure as needed:
cp .env.example .env| Variable | Required | Description |
|---|---|---|
CLAUDE_CODE_OAUTH_TOKEN |
Yes | OAuth token from claude setup-token |
AUTO_BUILD_MODEL |
No | Model override (default: claude-opus-4-5-20251101) |
DEFAULT_BRANCH |
No | Base branch for worktrees (auto-detects main/master) |
DEBUG |
No | Enable debug logging (default: false) |
| Variable | Required | Description |
|---|---|---|
LINEAR_API_KEY |
No | Linear API key for task sync |
GITLAB_TOKEN |
No | GitLab Personal Access Token |
GITLAB_INSTANCE_URL |
No | GitLab instance URL (defaults to gitlab.com) |
| Variable | Required | Description |
|---|---|---|
GRAPHITI_ENABLED |
No | Enable Memory Layer (default: true) |
GRAPHITI_LLM_PROVIDER |
No | LLM provider: openai, anthropic, ollama, google, openrouter |
GRAPHITI_EMBEDDER_PROVIDER |
No | Embedder: openai, voyage, ollama, google, openrouter |
See .env.example for complete configuration options including provider-specific settings.