Skip to content

segersniels/fracture

Repository files navigation

fracture

A lightweight CLI for managing git worktrees. Create isolated working directories instantly and work on multiple branches in parallel.

Fracture

Install

curl -fsSL https://raw.githubusercontent.com/segersniels/fracture/master/install.sh | bash
Build from source

Requires Bun.

git clone https://github.com/segersniels/fracture.git
cd fracture
bun install
make install

Usage

# Create a new worktree - interactive branch selection with search
fracture

# Create a new worktree with a new branch off current HEAD
fracture -b my-feature

# Create a new worktree and wait for dependency installation
fracture --foreground-install

# Create a new worktree without installing dependencies
fracture --skip-install

# Create a new worktree without spawning a subshell
fracture --no-spawn

# List all active worktrees
fracture ls

# Re-enter an existing worktree
fracture enter
fracture enter --no-spawn

# Delete a worktree
fracture delete
fracture delete -f  # force delete with uncommitted changes

How it works

Fracture wraps git worktree with a simpler interface. When you run fracture:

  1. Select a branch (type to search)
  2. A worktree is created at ~/.fracture/<repo>/<branch>/ (slashes/underscores become -)
  3. .env files are copied from your source
  4. Dependencies are started in the background (Node.js, Rust, Go), unless --foreground-install waits for them
  5. You're dropped into a subshell in the new directory

Worktrees share git history, remotes, and objects with the original repo. Commits are immediately visible across all worktrees. When you're done, exit the shell or close the terminal.

Use cases

  • Parallel debugging - Run two branches side by side to compare behavior
  • Quick hotfixes - Start a fix without disrupting your current work
  • Code review - Check out a PR branch while keeping your work intact
  • Long-running tasks - Let CI or builds run in one worktree while you continue elsewhere
  • AI pair programming - Let an AI agent work on one branch while you continue on another

License

MIT

About

A lightweight CLI for managing git worktrees. Create isolated working directories instantly and work on multiple branches in parallel.

Resources

License

Stars

Watchers

Forks

Contributors