workz
Git worktree manager for AI-native development — auto-synced dependencies, environment isolation, fleet orchestration, and a lazygit-style TUI.

The Problem
# Where's my .env? Gone.
# Where's node_modules? Gone. Time to wait for npm install again.
# Another 2GB of disk space wasted on duplicate dependencies.
# What port should this run on? Same as the other worktree?
The Fix
# .env files copied, node_modules symlinked, PORT=3000-3009 assigned, you're in. Done.
Install
# Homebrew (macOS / Linux)
# Cargo
Or build from source:
&&
Shell Setup
# zsh (~/.zshrc) or bash (~/.bashrc)
# fish (~/.config/fish/config.fish)
|
TUI Dashboard
Run workz with no arguments to launch the dashboard:

4 panels show everything at a glance:
| Panel | Shows |
|---|---|
| Worktrees | All branches, dirty state, port allocations, last commit |
| Fleet | Parallel AI agent tasks, running/modified/clean status |
| Files | Modified files for the selected worktree (M/A/D/??) |
| Ports | Isolated port ranges and database names |
| Key | Action |
|---|---|
Tab / Shift+Tab |
Cycle panels |
j / k |
Navigate within panel |
n |
New worktree |
d |
Delete worktree |
s |
Sync worktree |
r |
Refresh all |
? |
Help |
q |
Quit |
Usage
Create a worktree
What happens:
- Creates
../myrepo--feature-loginas a git worktree - Symlinks
node_modules,target,.venv(project-aware, not duplicated) - Copies
.env*files into the new worktree - Optionally assigns isolated PORT range, DB_NAME, COMPOSE_PROJECT_NAME
List and switch
Remove a worktree
Sync existing worktrees
Clean up
Environment Isolation
--isolated gives each worktree its own port range, database, and compose project — no collisions between worktrees.
# PORT=3000 PORT_END=3009 DB_NAME=feat_auth COMPOSE_PROJECT_NAME=feat_auth
# PORT=3010 PORT_END=3019 DB_NAME=feat_api COMPOSE_PROJECT_NAME=feat_api
All values are written to .env.local in the worktree. workz detects 14 web frameworks and writes framework-specific variables:
| Framework | Extra env var |
|---|---|
| Spring Boot | SERVER_PORT |
| Flask | FLASK_RUN_PORT |
| FastAPI | UVICORN_PORT |
| Vite | VITE_PORT |
Port ranges are allocated in aligned 10-port blocks (configurable) and tracked in ~/.config/workz/ports.json. Released automatically on workz done.
Fleet Mode
Orchestrate parallel AI agents across isolated worktrees.
# Spin up 3 Claude agents in parallel
# Watch all agents live
# Run tests across all fleet worktrees
# Merge completed work back
# Or open a PR for each
# Tear it all down
Load tasks from a file:
AI Agent Workflow
Launch any AI coding tool in a fresh worktree:
MCP Server
workz ships a built-in MCP server so AI agents can manage worktrees autonomously.
Or add to ~/.claude/settings.json:
Tools exposed
| Tool | Description |
|---|---|
workz_start |
Create a worktree (supports --isolated) |
workz_list |
List all worktrees as JSON |
workz_status |
Branch, dirty state, last commit |
workz_sync |
Re-sync symlinks/env into a worktree |
workz_done |
Remove a worktree (optional force) |
workz_conflicts |
Detect files modified in multiple worktrees |
Web Dashboard
What Gets Synced
Symlinked directories (27 dirs, project-type aware — only syncs what's relevant):
| Project | Directories |
|---|---|
| Node.js | node_modules, .next, .nuxt, .svelte-kit, .turbo, .parcel-cache, .angular |
| Rust | target |
| Python | .venv, venv, __pycache__, .mypy_cache, .pytest_cache, .ruff_cache |
| Go | vendor |
| Java/Kotlin | .gradle, build |
| General | .direnv, .cache |
| IDE | .vscode, .idea, .cursor, .claude, .zed |
Copied files (17 patterns):
.env, .env.*, .envrc, .tool-versions, .node-version, .python-version, .ruby-version, .nvmrc, .npmrc, .yarnrc.yml, docker-compose.override.yml, .secrets, .secrets.*
Auto-install (detected from lockfiles):
| Lockfile | Command |
|---|---|
bun.lockb / bun.lock |
bun install --frozen-lockfile |
pnpm-lock.yaml |
pnpm install --frozen-lockfile |
yarn.lock |
yarn install --frozen-lockfile |
package-lock.json |
npm ci |
uv.lock |
uv sync |
Pipfile.lock |
pipenv install |
poetry.lock |
poetry install |
requirements.txt |
pip install -r requirements.txt |
Configuration
Two layers — project overrides global:
- Global —
~/.config/workz/config.toml - Project —
.workz.tomlin repo root
[]
= ["node_modules", "target", ".venv", "my-large-cache"]
= [".env*", ".envrc", "secrets.json"]
= ["logs", "tmp"]
[]
= "pnpm install --frozen-lockfile"
= "docker compose down"
[]
= 10 # ports per worktree (default: 10)
= 3000 # first port (default: 3000)
Zero config works out of the box for Node, Rust, Python, Go, and Java projects.
Docker Support
Supports both docker compose and podman-compose.
Requirements
- Git 2.15+
- Linux or macOS