{"id":30522993,"url":"https://github.com/rizome-dev/claude-code-trees","last_synced_at":"2026-04-15T20:02:53.854Z","repository":{"id":310724557,"uuid":"1040846706","full_name":"rizome-dev/claude-code-trees","owner":"rizome-dev","description":"Easily manage Claude Code Worktrees via the Claude Code SDK","archived":false,"fork":false,"pushed_at":"2025-08-19T20:11:47.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-19T22:13:29.348Z","etag":null,"topics":["claude","claude-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rizome-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-19T15:37:12.000Z","updated_at":"2025-08-19T20:11:50.000Z","dependencies_parsed_at":"2025-08-19T22:23:52.169Z","dependency_job_id":null,"html_url":"https://github.com/rizome-dev/claude-code-trees","commit_stats":null,"previous_names":["rizome-dev/claude-code-trees"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rizome-dev/claude-code-trees","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fclaude-code-trees","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fclaude-code-trees/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fclaude-code-trees/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fclaude-code-trees/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizome-dev","download_url":"https://codeload.github.com/rizome-dev/claude-code-trees/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizome-dev%2Fclaude-code-trees/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272250460,"owners_count":24900221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-code"],"created_at":"2025-08-26T19:44:18.736Z","updated_at":"2026-04-15T20:02:53.771Z","avatar_url":"https://github.com/rizome-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Claude Code Trees\n\nEasily manage Claude Code via Git Worktrees, SQLite \u0026 Claude Code SDK.\n\n[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![claude-code-trees](https://img.shields.io/badge/claude--code--trees-0.1.0-green.svg)](https://pypi.org/project/claude-code-trees/)\n[![Tests](https://img.shields.io/badge/tests-96%20passing-success.svg)](https://github.com/rizome-dev/claude-code-trees)\n\n```bash\npip install claude-code-trees\n```\n\n[Example Usage](https://github.com/rizome-dev/claude-code-trees/blob/main/examples/orchestration.py)\n\n## Documentation\n\n### Orchestrator\nThe main coordination hub that manages instances, worktrees, and sessions.\n\n```python\norchestrator = Orchestrator(\n    base_repo_path=\"/path/to/repo\",\n    config=config\n)\n\n# Create instances\ninstance = await orchestrator.create_instance()\n\n# Run parallel tasks\nresult = await orchestrator.run_parallel_tasks(tasks)\n\n# Health monitoring\nhealth = await orchestrator.health_check()\n```\n\n### ClaudeCodeInstance\nWrapper for individual Claude Code instances running in specific worktrees.\n\n```python\n# Execute commands\nresult = await instance.execute_command(\"create new file\")\n\n# Run high-level tasks\nresult = await instance.run_task(\"Implement feature X\", context={})\n\n# Health checks\nhealth = await instance.health_check()\n```\n\n### WorktreeManager\nManages git worktrees for isolated development environments.\n\n```python\n# Create worktrees\nworktree = manager.create_worktree(\"feature-wt\", \"feature-branch\")\n\n# List and manage worktrees\nworktrees = manager.list_worktrees()\nsuccess = manager.remove_worktree(\"old-worktree\")\n```\n\n### SessionManager\nHandles persistent sessions with task tracking and execution.\n\n```python\n# Create sessions\nsession = manager.create_session(\"Development Session\")\n\n# Add tasks with dependencies\ntask = manager.add_task(\n    session_id, \n    \"Implement feature\",\n    dependencies=[\"setup-task\"]\n)\n\n# Execute sessions\nsuccess = await manager.execute_session(session_id, instances)\n```\n\n## Configuration\n\nClaude Code Trees uses a flexible configuration system:\n\n```python\nfrom claude_code_trees import Config\n\nconfig = Config(\n    # Claude settings\n    claude_api_key=\"your-key\",\n    claude_model=\"claude-3-sonnet-20240229\",\n    max_tokens=4096,\n    \n    # Orchestration settings\n    max_concurrent_instances=3,\n    instance_timeout=300,\n    \n    # Database settings\n    database_url=\"sqlite:///claude_trees.db\",\n    \n    # Worktree settings\n    worktree_base_path=Path(\"/tmp/worktrees\"),\n    default_branch=\"main\"\n)\n```\n\nEnvironment variables are also supported with the `CLCT_` prefix:\n\n```bash\nexport CLCT_CLAUDE_API_KEY=\"your-key\"\nexport CLCT_MAX_CONCURRENT_INSTANCES=5\nexport CLCT_WORKTREE_BASE_PATH=\"/custom/path\"\n```\n\n### Use Cases\n\n#### Parallel Feature Development\n```python\n# Run multiple feature implementations simultaneously\ntasks = [\n    {\"name\": \"User Auth\", \"description\": \"Implement user authentication\"},\n    {\"name\": \"API Endpoints\", \"description\": \"Create REST API endpoints\"},\n    {\"name\": \"Database Schema\", \"description\": \"Design and implement database schema\"}\n]\n\nresult = await orchestrator.run_parallel_tasks(tasks)\n```\n\n#### Sequential Workflow\n```python\n# Run tasks in sequence with dependencies\nworkflow = [\n    {\"name\": \"Setup\", \"description\": \"Initialize project structure\"},\n    {\"name\": \"Core Logic\", \"description\": \"Implement core business logic\"},\n    {\"name\": \"Tests\", \"description\": \"Create comprehensive test suite\"},\n    {\"name\": \"Documentation\", \"description\": \"Generate documentation\"}\n]\n\nresult = await orchestrator.run_sequential_workflow(workflow)\n```\n\n#### Code Review and Analysis\n```python\n# Analyze code across multiple worktrees\nanalysis_tasks = [\n    {\"name\": \"Security Audit\", \"description\": \"Perform security analysis\"},\n    {\"name\": \"Performance Review\", \"description\": \"Identify performance bottlenecks\"},\n    {\"name\": \"Code Quality\", \"description\": \"Check code quality and standards\"}\n]\n\nresults = await orchestrator.run_parallel_tasks(analysis_tasks)\n```\n\n## Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/rizome-dev/claude-code-trees.git\ncd claude-code-trees\n\n# Install dependencies with PDM\npdm install -d\n\n# Run tests (all 96 tests passing)\npdm run test\n\n# Run linting\npdm run lint\n\n# Format code\npdm run format\n\n# Type checking\npdm run typecheck\n\n# Test coverage\npdm run test-cov\n```\n\n---\n\nBuilt with ❤️ by [Rizome Labs](https://rizome.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizome-dev%2Fclaude-code-trees","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizome-dev%2Fclaude-code-trees","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizome-dev%2Fclaude-code-trees/lists"}