Git worktree workflow manager for feature development. Automates creating worktrees, tmux sessions, docker services, and more.
Why fwts? When working on multiple features simultaneously, git worktrees let you have separate working directories for each branch. fwts automates the tedious parts: creating worktrees, spinning up tmux sessions, managing docker services, and switching shared resources between features.
- Worktree Management - Create and manage git worktrees for parallel feature development
- Multi-Project Support - Manage multiple repos with named projects in global config
- Tmux Integration - Automatic session creation with editor and side command (e.g., Claude)
- Docker Compose - Start/stop isolated docker services per feature
- Linear Integration - Resolve ticket IDs to branch names
- GitHub Integration - Resolve PR numbers to branches
- Interactive TUI - Rich terminal UI for viewing and managing worktrees
- Programmable Columns - Custom hooks for CI status, review status, etc.
- Shell Completions - bash, zsh, and fish support
brew tap laudiacay/tap
brew install fwtsAuto-updates: Since we ship changes frequently, enable auto-update:
# Auto-update daily (add to your shell rc file)
export HOMEBREW_AUTO_UPDATE_SECS=86400
# Or manually update anytime
brew upgrade fwtsCheck for new releases: https://github.com/laudiacay/fwts/releases
pip install fwts
# or with uv (recommended for CLI tools)
uv tool install fwts
# Update with:
pip install --upgrade fwts
# or
uv tool upgrade fwtsfwts includes an interactive setup wizard that guides you through configuration:
For multi-project setup (recommended):
fwts init --globalThis will prompt you for:
- Project names and repo paths
- GitHub repositories
- Linear integration (if you use it)
- Tmux layout preferences (editor, side command)
- Docker compose integration
- Custom hooks and columns for the TUI
For single-project setup:
cd ~/code/myproject
fwts initThe wizard will auto-detect:
- Git repository information
- Default branch (main/dev/master)
- GitHub remote URL
And prompt you to configure:
- Worktree base directory
- Integrations (Linear, Docker)
- Tmux layout (editor, side pane)
- Claude Code context
- Lifecycle hooks
- Custom TUI columns
# From a Linear ticket
fwts start SUP-123
# From a GitHub PR
fwts start #456
# From a branch name
fwts start feature/my-feature
# Interactive mode - pick from existing worktrees or tickets
fwts start# Interactive TUI with status columns
fwts status
# Simple list
fwts list# Cleanup specific worktree
fwts cleanup feature/my-feature
# Interactive cleanup with uncommitted changes detection
fwts cleanupCreate ~/.config/fwts/config.toml for managing multiple projects:
# Default project when not in a project directory
default_project = "myproject"
[projects.myproject]
name = "myproject"
main_repo = "~/code/myproject"
worktree_base = "~/code/myproject-worktrees"
base_branch = "main"
github_repo = "username/myproject"
[projects.another]
name = "another"
main_repo = "~/code/another"
worktree_base = "~/code/another-worktrees"
base_branch = "dev"Create .fwts.toml in your repo root:
[project]
name = "myproject"
main_repo = "~/code/myproject"
worktree_base = "~/code/myproject-worktrees"
base_branch = "main"
github_repo = "username/myproject"
[linear]
enabled = true
# LINEAR_API_KEY from environment
[tmux]
editor = "nvim ."
side_command = "claude"
layout = "vertical"
[lifecycle]
on_start = ["just up"]
on_cleanup = ["just down"]
[symlinks]
paths = [".env.local"]
[docker]
enabled = true
compose_file = "docker-compose.dev.yml"
# Custom TUI columns
[[tui.columns]]
name = "CI"
hook = "gh run list --branch $BRANCH_NAME --limit 1 --json conclusion -q '.[0].conclusion'"
color_map = { success = "green", failure = "red", pending = "yellow" }Create .fwts.local.toml in a worktree to override settings for that specific worktree. This file should be gitignored.
Configuration is loaded and merged in this order (later overrides earlier):
~/.config/fwts/config.toml(global)<main_repo>/.fwts.toml(per-repo)<worktree>/.fwts.local.toml(per-worktree)
| Command | Description |
|---|---|
fwts start [input] |
Start or resume a feature worktree |
fwts cleanup [input] |
Clean up worktree, tmux, docker |
fwts status |
Interactive TUI dashboard |
fwts list |
Simple worktree list |
fwts projects |
List configured projects |
fwts init |
Initialize config file |
fwts init --global |
Initialize global config |
fwts completions <shell> |
Generate shell completions |
All commands support:
--project, -p- Use a specific named project from global config--config, -c- Use a specific config file
fb is an alias for fwts:
fb start SUP-123
fb status| Key | Action |
|---|---|
j / ↓ |
Move down |
k / ↑ |
Move up |
space |
Toggle selection |
a |
Select all |
enter |
Launch selected |
d |
Cleanup selected |
r |
Refresh |
q |
Quit |
Add custom status columns to the TUI dashboard by defining hooks in your config:
[[tui.columns]]
name = "CI"
hook = "gh run list --branch $BRANCH_NAME --limit 1 --json conclusion -q '.[0].conclusion'"
color_map = { success = "green", failure = "red", pending = "yellow", null = "dim" }
[[tui.columns]]
name = "Review"
hook = "gh pr view $BRANCH_NAME --json reviewDecision -q '.reviewDecision' 2>/dev/null || echo 'none'"
color_map = { APPROVED = "green", CHANGES_REQUESTED = "red", REVIEW_REQUIRED = "yellow" }
[[tui.columns]]
name = "Checks"
hook = "gh pr checks $BRANCH_NAME 2>/dev/null | grep -c '✓' || echo '0'"Hooks have access to these environment variables:
$BRANCH_NAME- The worktree's branch name$WORKTREE_PATH- Path to the worktree$MAIN_REPO- Path to the main repository
Run commands automatically during worktree lifecycle:
[lifecycle]
# Run after worktree creation
post_create = ["npm install", "cp .env.example .env"]
# Run when starting a worktree
on_start = ["just up", "just migrate"]
# Run when cleaning up
on_cleanup = ["just down", "just clean-cache"]Create .fwts.local.toml in any worktree to override settings just for that worktree:
[tmux]
editor = "code ." # Use VS Code instead of neovim for this worktree
[docker]
enabled = false # Don't start docker for this worktree# Bash
eval "$(fwts completions bash)"
# Zsh
eval "$(fwts completions zsh)"
# Fish
fwts completions fish > ~/.config/fish/completions/fwts.fish| Variable | Description |
|---|---|
LINEAR_API_KEY |
Linear API key for ticket integration |
- Python 3.10+
- git
- tmux
- gh (GitHub CLI) - optional, for PR integration
MIT