Skip to main content

Git worktree manager for parallel coding agent development

Project description

Timberline

Git worktree manager for parallel coding agent development.

Features

  • Auto-launch coding agents — spawn Claude, Codex, OpenCode, or Aider directly into a worktree (tl new --agent)
  • Agent context injection — auto-injects worktree metadata (branch, base, sibling worktrees) into agent config files (CLAUDE.md, AGENTS.md)
  • Auto-init dependencies — detects & installs via bun/npm/pnpm/yarn/uv/pip/cargo/go/composer/bundle on worktree creation
  • Auto-copy .env files — glob-based discovery with include/exclude patterns, sync & diff commands
  • Auto-init submodules — recursive submodule setup on worktree creation
  • Shell integrationtlcd to cd into worktrees, tl-prompt for PS1, auto-install for bash/zsh/fish
  • Creative naming schemes — minerals, cities, or compound names for auto-named worktrees
  • Branch templates — configurable {user}/{type}/{name} patterns for consistent naming
  • Land workflow — pre-land checks → push → PR creation in one command
  • Multi-worktree status — git status, ahead/behind tracking across all worktrees
  • Sync all worktrees — rebase or merge all worktrees on latest base branch

Install

# global CLI (recommended)
uv tool install timberline

# or with pip
pip install timberline

Upgrade

uv tool upgrade timberline

Setup

Setup shell aliases

tl install

Quick Start

cd your-repo
tl init                     # create .timberline.toml
tl new auth-refactor        # create worktree + branch
tl new --type fix           # auto-named fix worktree
tl ls                       # list all worktrees
cd $(tl cd auth-refactor)   # jump into worktree
tlcd auth-refactor          # jump into worktree (shell aliases installed)
tl land                     # commit, run checks and push pr
tl rm auth-refactor         # clean up

Getting Started

Run tl init inside any git repo to create .timberline.toml. The wizard auto-detects:

  • Project name — defaults to the repo directory name, used for global worktree storage at ~/.timberline/projects/<name>/
  • Branch prefix from your git user
  • Base branch (main/master/develop)
  • Package manager (bun, npm, pnpm, yarn, uv, pip, cargo, go, composer, bundle) for dependency install
  • Pre-land checks (Makefile targets, npm scripts like lint, test, check)
  • Default agent (claude, codex, opencode, aider) if installed

Worktrees are stored globally at ~/.timberline/projects/<project>/worktrees/ — fully outside the repo tree. This prevents agents from accidentally writing files into the parent repo.

Use --defaults to skip prompts and accept detected values.

Create & Enter a Worktree

tl new auth-refactor            # named worktree
tl new --type fix               # auto-named (minerals, cities, or compound)
tl new --agent                  # create + launch coding agent

Enter a worktree:

cd $(tl cd auth-refactor)       # subshell-friendly

Or with shell integration (tl install):

tlcd auth-refactor              # cd directly

Each worktree gets its own branch (from branch_template), dependencies installed via auto_init, and .env files copied from the main repo.

Sync with Base Branch

tl sync                     # rebase current worktree onto base
tl sync auth-refactor       # rebase specific worktree
tl sync --all               # rebase all worktrees
tl sync --merge             # merge instead of rebase

Fetches all remotes, then rebases (default) or merges onto origin/{base_branch}. Each worktree tracks its own base branch from creation — no hardcoded "main".

Land a PR

tl land auth-refactor           # checks → push → PR
tl land --draft                 # create as draft PR
tl land --skip-checks           # bypass pre-land checks

tl land runs your configured pre_land command (e.g. make check), pushes the branch, then creates a PR via gh. Configure it in .timberline.toml:

[timberline]
pre_land = "make check"  # or "bun run lint && bun run test", etc.

Commands

Command Description
tl init Interactive setup, write .timberline.toml
tl new [name] Create worktree (aliases: create)
tl ls List worktrees (aliases: list). --json, --paths
tl rm <name> Remove worktree (aliases: remove). --force, --keep-branch, --all
tl cd <name> Print worktree path. --shell for subshell
tl status Git status across all worktrees
tl sync [name] Rebase/merge on base branch. --all, --merge
tl land [name] Run checks, push, and create PR. --draft, --skip-checks
tl rename <branch> Rename worktree's git branch. -n <name>
tl agent [name] Launch coding agent in worktree. --new
tl run-init [name] Re-run dependency install
tl pr [name] Create PR via gh CLI. --draft
tl env sync [name] Re-copy .env files from main repo
tl env ls List discovered .env files
tl env diff [name] Show .env differences
tl clean Prune stale worktrees. --dry-run
tl install Install shell integration into rc file. --uninstall
tl shell-init Output shell integration script
tl config show Print resolved config
tl config set <k> <v> Set config value
tl config edit Open config in $EDITOR

Config

.timberline.toml in repo root:

[timberline]
project_name = "my-project"  # global storage name (~/.timberline/projects/<name>/)
branch_template = "{user}/{type}/{name}"
user = "nc9"
default_type = "feature"
base_branch = "main"
naming_scheme = "minerals"  # minerals | cities | compound
default_agent = "claude"   # claude | codex | opencode | aider
pre_land = "make check"    # command to run before pushing

[timberline.init]
auto_init = true
# init_command = "bun run init"
# post_init = ["echo done"]

[timberline.env]
auto_copy = true
patterns = [".env", ".env.*", "!.env.example", "!.env.template"]
scan_depth = 3

[timberline.submodules]
auto_init = true
recursive = true

[timberline.agent]
auto_launch = false
inject_context = true

Shell Integration

# Automatic install:
tl install

# Or manually add to .zshrc / .bashrc:
eval "$(tl shell-init)"

# Then use:
tlcd obsidian       # cd into worktree
tl-prompt           # worktree name for PS1

Development

uv sync
make test     # pytest
make lint     # ruff + basedpyright
make fmt      # ruff format
make check    # all of the above

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timberline-0.1.4.tar.gz (51.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timberline-0.1.4-py3-none-any.whl (28.7 kB view details)

Uploaded Python 3

File details

Details for the file timberline-0.1.4.tar.gz.

File metadata

  • Download URL: timberline-0.1.4.tar.gz
  • Upload date:
  • Size: 51.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timberline-0.1.4.tar.gz
Algorithm Hash digest
SHA256 8f5f4c3818f400a843edcef5c57e55eb314ff45ac7122156c9bf27e3d0ecc8f4
MD5 3d046282bd0d70a3e528a6684dea1638
BLAKE2b-256 a48d695b70395ecc82003a82fcb9165e056cf3a147b4a5fe145329f2b8fab03a

See more details on using hashes here.

File details

Details for the file timberline-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: timberline-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 28.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for timberline-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a53c8a9b21507b20a05b5596036431eecca752e0ef2aae05fda0fd8d85c4a0a
MD5 7b046f8ab1760a44cc56385a5b170bd6
BLAKE2b-256 b53efffc2447f99b5e6a8b36646739041a44f0ac8907d555ad77959e40491b9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page