Mark CipollaLogo

Mark Cipolla

I work on a few things at once, which means a lot of git worktrees, and a lot of remembering which branch belonged to which Linear issue. Creating one meant copying an issue key out of the browser, inventing a branch name, running git worktree add, then finding the directory again later. treeline does that part for me.

treeline

GoBubble TeaBubblesLip GlossBubbleZonetmuxLinearTUI
GitHub
treeline running in a terminal: the worktrees table, a claude session, the file tree, and the git log with a commit diff

treeline is a git worktree manager with Linear built in. Pick one of your issues and it creates a worktree on a branch named the way you want it, feature/ENG-142/slug-of-the-issue-title, checked out under .worktrees/ inside the repo and hidden from git status. One table shows your issues grouped by status, with each issue's worktree, git state, and GitHub CI status inline.

It grew into more than a picker. Alongside the issues table are panes for claude, an editor, git, and a shell, laid out according to how wide your terminal is: the issues table on its own when it's narrow, up to five columns when it isn't. The git pane does staging, hunk-by-hunk, commit logs and branch diffs. The editor pane is a file tree, tabs, syntax highlighting and git gutters, and it holds its footing while claude edits the same files underneath it. It also ships on its own as tide.

The claude and shell panes keep running after you quit. Where tmux is installed treeline starts them on a tmux server of its own, so quitting only detaches: the claude session in a worktree keeps its context and a dev server in the shell pane keeps serving, and the next launch attaches straight back to them.

It works across as many repositories as you register, and each one can have setup and cleanup hooks that run when a worktree is created or removed, for assigning a port or creating and dropping a database.

Built with Bubble Tea, Lip Gloss and BubbleZone for mouse support. Install it with brew install markcipolla/tap/treeline or go install github.com/markcipolla/treeline@latest.

Mark lives and works on unceded Wurundjeri land in Naarm / Melbourne, Australia, and acknowledges the traditional custodians of the land on which he lives, paying respects to elders past and present, recognising the resilience, strength and pride of the Aboriginal and Torres Strait Islander communities.