Run multiple AI coding agents in parallel on the same repo—each in its own isolated git worktree with shared config and dependencies.
AI agents (Cursor, Copilot, Claude Code, etc.) work best with full repo access, but they can't share a working directory. Treefrog solves this by creating isolated worktrees where each agent gets its own branch and directory while sharing files you specify (.env, node_modules, etc.).
Download the appropriate binary for your platform from the releases page and make it executable:
# macOS ARM64 (Apple Silicon)
curl -L -o treefrog https://github.com/your-username/treefrog/releases/latest/download/treefrog-macos-arm64
chmod +x treefrog
sudo mv treefrog /usr/local/bin/
# macOS x64 (Intel)
curl -L -o treefrog https://github.com/your-username/treefrog/releases/latest/download/treefrog-macos-x64
chmod +x treefrog
sudo mv treefrog /usr/local/bin/
# Linux x64
curl -L -o treefrog https://github.com/your-username/treefrog/releases/latest/download/treefrog-linux-x64
chmod +x treefrog
sudo mv treefrog /usr/local/bin/
# Linux ARM64
curl -L -o treefrog https://github.com/your-username/treefrog/releases/latest/download/treefrog-linux-arm64
chmod +x treefrog
sudo mv treefrog /usr/local/bin/
# Windows x64
# Download treefrog-windows-x64.exe and add to your PATHIf you have Bun installed:
git clone https://github.com/your-username/treefrog.git
cd treefrog
bun install
bun run build
sudo cp treefrog /usr/local/bin/treefrogYou can run the CLI directly with bun if it's installed:
bun run src/index.ts# Create new agent worktree (uses global treefrog config)
treefrog create implement-user-auth
# Create a worktree and open an interactive shell there
treefrog create implement-user-auth --shell
# Open a shell in an existing worktree
treefrog enter implement-user-auth
# Checkout a worktree branch: remove worktree and checkout branch in main repo
treefrog checkout implement-user-auth
# List active agent worktrees
treefrog list
# Remove worktree directory (but keep branch as it is!)
treefrog remove implement-user-auth# zsh
treefrog complete zsh > ~/.treefrog-completion.zsh
echo 'source ~/.treefrog-completion.zsh' >> ~/.zshrc
# bash
treefrog complete bash > ~/.treefrog-completion.bash
echo 'source ~/.treefrog-completion.bash' >> ~/.bashrc
# fish
treefrog complete fish > ~/.config/fish/completions/treefrog.fishRequires Bun v1.2.16+.
bun install
bun run build # current platform
bun run build:all # all platforms (macOS/Linux/Windows, x64/ARM64)Output: ./treefrog (local) or dist/treefrog-{platform}-{arch} (cross-platform).
Treefrog reads configuration from a global JSON file:
$XDG_CONFIG_HOME/treefrog/config.jsonwhenXDG_CONFIG_HOMEis set~/.config/treefrog/config.jsonotherwise
Config is project-scoped by canonical repository root path (realpath absolute path).
{
"version": 1,
"projects": {
"/absolute/path/to/repo": {
"shareFiles": [".env", ".env.local", "package.json"],
"cloneFiles": ["secrets.json", "config/database.yml"],
"commands": [
"npm install",
"echo \"Setting up development environment...\"",
"cp .env.example .env.local"
]
}
}
}shareFiles- Paths to symlink from main repo into the new worktreecloneFiles- Paths to copy from main repo into the new worktreecommands- Shell commands to run after file operations
If no matching project entry exists, treefrog proceeds with no file or command actions.
Old:
share=.env,.env.local
clone=secrets.json
[commands]
npm installNew:
{
"version": 1,
"projects": {
"/absolute/path/to/repo": {
"shareFiles": [".env", ".env.local"],
"cloneFiles": ["secrets.json"],
"commands": ["npm install"]
}
}
}