Agentree creates and manages isolated Git worktrees for AI coding agents, letting multiple agents work on separate branches simultaneously without conflicts.
git clone https://github.com/AryaLabsHQ/agentree.gitAgentree is a CLI tool that spins up isolated Git worktrees so AI coding agents like Claude Code and Cursor can work on separate branches at the same time without stepping on each other. Each worktree gets its own working directory, branch, and environment files—automatically copied using .gitignore-based discovery to ensure secrets and configs are available. It supports monorepos by recursively finding nested environment files, and also copies AI tool configurations such as .claude/settings.local.json and .cursorrules into each new worktree. Shell completion for Bash, Zsh, Fish, and PowerShell is built in, with dynamic completions for branch and worktree names. Developers running multiple AI agents in parallel benefit most, eliminating the context-switching and merge conflicts that come from sharing a single working directory.
Install agentree via Homebrew or from the GitHub releases page. Configure defaults in a .agentreerc file at the project or global (~/.config/agentree/) level, including include/exclude patterns for environment files. Use the agentree create command to spin up a new worktree on a branch, and agentree remove to tear it down when done. Enable shell completion by running agentree completion for your shell and sourcing the generated script.
Run multiple AI coding agents in parallel on different features without branch conflicts
Automatically copy .env files and secrets into each new worktree using .gitignore patterns
Propagate AI tool configs like .cursorrules and .claude/settings.local.json to every agent workspace
Manage worktrees in monorepos with recursive environment file discovery across packages
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/AryaLabsHQ/agentreeCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Create a new isolated Git worktree for an AI coding agent named [AGENT_NAME] working on [PROJECT_NAME]. The worktree should be named [WORKTREE_NAME] and based on the branch [BRANCH_NAME]. Ensure the worktree is properly initialized with the latest code from the branch and has all necessary dependencies installed.
# Git Worktree Creation Report ## Worktree Details - **Agent Name:** CodeBot-3000 - **Project Name:** E-Commerce Platform - **Worktree Name:** codebot-ecommerce-feature - **Branch Name:** feature/add-payment-gateway ## Worktree Location `/path/to/repository/codebot-ecommerce-feature` ## Status ✅ Worktree successfully created ✅ Branch checked out ✅ Dependencies installed ## Next Steps 1. Verify the worktree contents 2. Begin coding tasks 3. Commit changes to the branch
Cloud ETL platform for non-technical data integration
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan