| Crates.io | claude-launcher |
| lib.rs | claude-launcher |
| version | 0.2.0 |
| created_at | 2025-07-12 16:58:33.606277+00 |
| updated_at | 2025-07-12 16:58:33.606277+00 |
| description | A tool for managing parallel AI agent tasks with Claude |
| homepage | https://github.com/CharlonTank/claude-launcher |
| repository | https://github.com/CharlonTank/claude-launcher |
| max_upload_size | |
| id | 1749509 |
| size | 219,588 |
A Rust CLI tool that launches multiple Claude AI instances in separate iTerm tabs to work on tasks in parallel. Specialized for Elm and Lamdera development, with built-in support for Test-Driven Development (TDD) using lamdera-program-test.
claude-launcher opens new iTerm tabs, each running Claude with a specific task. Each Claude instance:
.claude-launcher/todos.json file in that directory.claude-launcher/todos.json to mark the task as complete with a commentWhen run without arguments, claude-launcher automatically:
.claude-launcher/todos.json to find the next phase with TODO statusFor debugging or when tasks must run sequentially:
claude-launcher --step-by-step
claude-launcher --step-by-step when doneClaude Launcher supports running each phase in isolated git worktrees, allowing parallel development without branch conflicts. This implements Anthropic's recommended workflow for running parallel Claude Code sessions, with additional automation and management features.
Add worktree configuration to .claude-launcher/config.json:
{
"name": "Your Project",
"agent": {
"before_stop_commands": []
},
"cto": {
"validation_commands": [],
"few_errors_max": 3
},
"worktree": {
"enabled": false,
"naming_pattern": "claude-phase-{id}-{timestamp}",
"max_worktrees": 5,
"base_branch": "main",
"auto_cleanup": true
}
}
enabled: Enable worktree mode by default (default: false)naming_pattern: Pattern for worktree names (supports {id} and {timestamp})max_worktrees: Maximum number of worktrees to keep (default: 5)base_branch: Branch to create worktrees from (default: "main")auto_cleanup: Automatically remove completed worktrees (default: true)# Run next phase in a worktree
claude-launcher --worktree-per-phase
# Or enable in config and use auto mode
claude-launcher
claude-launcher --list-worktrees
Output:
Claude Launcher Active Worktrees
================================
Found 2 worktree(s):
1. claude-phase-1-20240115_143022
Path: ../claude-phase-1-20240115_143022
Branch: claude-phase-1-20240115_143022
Created: 20240115_143022
Phase ID: 1
Status: Active
Phase: Foundation Setup
Progress: 1 TODO, 2 IN PROGRESS, 1 DONE
2. claude-phase-2-20240115_144512
Path: ../claude-phase-2-20240115_144512
Branch: claude-phase-2-20240115_144512
Created: 20240115_144512
Phase ID: 2
Status: Completed
Phase: Feature Implementation
Progress: 0 TODO, 0 IN PROGRESS, 4 DONE
# Manual cleanup
claude-launcher --cleanup-worktrees
# Automatic cleanup happens when:
# - auto_cleanup is enabled
# - A phase is marked as completed
# - max_worktrees limit is exceeded
Initialize Project
claude-launcher --init
Configure Worktrees
Edit .claude-launcher/config.json to enable worktrees:
{
"name": "Your Project",
"agent": {
"before_stop_commands": []
},
"cto": {
"validation_commands": [],
"few_errors_max": 3
},
"worktree": {
"enabled": true,
"max_worktrees": 3
}
}
Create Task Plan
claude-launcher --create-task "Implement new feature"
Execute with Worktrees
claude-launcher # Auto mode with worktrees
Monitor Progress
claude-launcher --list-worktrees
Merge Completed Work When a phase is completed, the worktree branch can be merged:
git merge --no-ff claude-phase-1-20240115_143022
Worktree Creation Fails
Can't Remove Worktree
--cleanup-worktrees for safe removalgit worktree remove -f <path>State File Issues
.claude-launcher/worktree_state.json--list-worktrees to rebuild stateClone this repository:
git clone https://github.com/CharlonTank/claude-launcher.git
cd claude-launcher
Run the install script (requires sudo to install to /usr/local/bin):
./install.sh
cargo build --release
sudo cp target/release/claude-launcher /usr/local/bin/
# Initialize a new project
claude-launcher --init
# Initialize with Lamdera preset
claude-launcher --init-lamdera
# Smart initialization (analyzes your project)
claude-launcher --smart-init
# Generate task phases from requirements
claude-launcher --create-task "your project requirements"
# Auto-launch next available tasks
claude-launcher
# Or manually launch specific tasks
claude-launcher "Phase 1, Step 1A: Task name" "Phase 1, Step 1B: Another task"
--init: Creates .claude-launcher/ directory with empty config and todos.json--init-lamdera: Creates .claude-launcher/ with Lamdera preset configuration--smart-init: Analyzes your project and creates appropriate configuration--create-task "requirements": Analyzes your requirements and generates detailed task phases--step-by-step: Runs tasks sequentially, one at a time--worktree-per-phase: Run each phase in its own git worktree--list-worktrees: List all active claude-launcher worktrees--cleanup-worktrees: Clean up completed worktreesInitialize your project:
# For a generic project
claude-launcher --init
# For a Lamdera project
claude-launcher --init-lamdera
# To auto-detect your project type
claude-launcher --smart-init
This creates a .claude-launcher/ directory with config.json and todos.json files.
Generate task phases:
claude-launcher --create-task "I want to build a REST API with user authentication and todo management"
Claude will analyze your requirements and create detailed phases with parallel tasks.
Launch agents:
# Automatic mode - launches next TODO phase
claude-launcher
# Or manually launch specific tasks
claude-launcher "Phase 1, Step 1A: Create database schema" "Phase 1, Step 1B: Setup Express server"
Claude Launcher uses a .claude-launcher/ directory to store configuration and task tracking:
.claude-launcher/
├── config.json # Project-specific validation commands and settings
└── todos.json # Task phases and progress tracking
The configuration file defines validation commands that CTOs will run and commands available to agents:
{
"name": "Project Name",
"agent": {
"before_stop_commands": [],
"commands": [
{
"description": "Add internationalization keys",
"pattern": "elm-i18n add --fr \"French text\" --en \"English text\" KEY_NAME",
"use_instead_of": "editing src/I18n.elm directly"
}
]
},
"cto": {
"validation_commands": [
{
"command": "npm test",
"description": "Run tests"
},
{
"command": "npm run lint",
"description": "Check code quality"
}
],
"few_errors_max": 5
},
"worktree": {
"enabled": false,
"naming_pattern": "claude-phase-{id}-{timestamp}",
"max_worktrees": 5,
"base_branch": "main",
"auto_cleanup": true
}
}
The commands array allows you to define project-specific commands that agents should use instead of directly editing files. This is particularly useful for:
When commands are configured, agents will be instructed to use these commands rather than manually editing the specified files.
The task file contains phases and steps:
{
"phases": [
{
"id": 1,
"name": "Core Setup",
"steps": [
{
"id": "1A",
"name": "Create database schema",
"prompt": "Create a PostgreSQL schema with users and todos tables...",
"status": "TODO",
"comment": ""
}
],
"status": "TODO",
"comment": ""
}
]
}
Claude-launcher is optimized for Elm and Lamdera projects:
When --init-lamdera is used, the configuration includes elm-i18n commands:
"commands": [
{
"description": "Add internationalization keys",
"pattern": "elm-i18n add --fr \"French text\" --en \"English text\" KEY_NAME",
"use_instead_of": "editing src/I18n.elm directly"
},
{
"description": "Add function-based translations",
"pattern": "elm-i18n add-fn --type-sig \"Int -> String\" --en \"\\n -> ...\" --fr \"\\n -> ...\" functionName",
"use_instead_of": "editing src/I18n.elm for parameterized translations"
}
]
With these commands configured, agents will automatically use elm-i18n commands instead of manually editing the I18n.elm file, ensuring consistent formatting and preventing merge conflicts.
When all tasks in a phase are complete but the phase status is still TODO, running claude-launcher will:
claude-launcher to start the next phaseThis ensures code quality and proper phase review before proceeding.
todos.json when completeInitialize and plan a new Lamdera app:
claude-launcher --init
claude-launcher --create-task "Build a Lamdera property management app with tenant portals and real-time notifications"
claude-launcher # Auto-launches Phase 1 tasks in parallel
For Test-Driven Development with lamdera-program-test:
claude-launcher --create-task "Add user authentication with TDD using lamdera-program-test"
claude-launcher --step-by-step # Runs tests first, then implementation
For sequential execution (useful for debugging):
claude-launcher --step-by-step # Runs Phase 1, Step 1A
# After 1A completes, it automatically runs 1B, then 1C, etc.
Pull requests are welcome! Please feel free to submit issues or enhancement requests.
Important: Tests may fail intermittently when run in parallel due to race conditions with directory changes. This is a known issue.
If you see random test failures like:
No such file or directoryFailed to load configRun tests single-threaded to ensure they pass consistently:
cargo test -- --test-threads=1
This forces tests to run sequentially, preventing conflicts when multiple tests change the current directory simultaneously. The failures are not bugs in the code, but rather a limitation of the test setup.
This project is open source and available under the MIT License.