explaingit

limin112/branchnew

Analysis updated 2026-05-18

13ShellAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A Mac command-line tool that splits your terminal and forks your current Claude Code session into a new independent pane.

Mindmap

mindmap
  root((branchnew))
    What it does
      Splits terminal pane
      Forks Claude session
      Keeps original intact
    Tech stack
      Shell
      tmux
      iTerm2
    Use cases
      Parallel Claude sessions
      Named session branches
      Hotkey forking
    Audience
      Claude Code users
      Mac developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Fork a running Claude Code session into a new terminal pane to explore a different approach in parallel.

USE CASE 2

Auto-name or manually name forked sessions to keep track of multiple parallel branches of work.

USE CASE 3

Set up an iTerm2 hotkey to instantly fork whichever Claude session is active.

USE CASE 4

Trigger a fork directly from inside a Claude Code chat using a slash command.

What is it built with?

ShelltmuxiTerm2

How does it compare?

limin112/branchnewadukecoins/codewatchfrichxi/zanai-writing-skill
Stars131313
LanguageShellShellShell
Setup difficultyeasymoderateeasy
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Single curl install command, macOS only.

In plain English

This is a small command-line tool for Mac users who work with Claude Code, the AI coding assistant. Its single job is to split your terminal window to the right and start a forked copy of your current Claude Code session in that new pane. The new copy picks up the same conversation context, then the two run independently from that point forward. Your original session is not affected in any way. The tool is called with one word: typing branchnew in the terminal does the split and the fork automatically. If you want to give the new session a name, you pass the name after the command, such as branchnew login-fix. Without a name, it auto-assigns names like newBranch1, newBranch2, and so on using a counter that keeps incrementing across all your sessions. You can also type /branchnew directly inside a Claude Code chat window to trigger the same behavior as a slash command. The tool detects what kind of terminal you are using and adjusts its approach. Inside tmux it creates a real split pane to the right. In iTerm2 it uses the native split. In Apple Terminal, which does not support split panes, it opens a new window instead. Terminals it cannot control fall back to opening a new Apple Terminal window. For iTerm2 users there is an optional hotkey mode. After a one-time setup, pressing a keyboard shortcut forks the exact Claude session running in the current pane, even if that session is itself already a fork. This uses an iTerm2 background process combined with Claude hooks that track which terminal pane corresponds to which session. Installation is a single curl command that downloads and sets up the tool without requiring you to clone the repository. The project is licensed under MIT, meaning free use with attribution.

Copy-paste prompts

Prompt 1
Explain how branchnew decides whether to split a pane or open a new window.
Prompt 2
Walk me through installing branchnew with the curl command and running it for the first time.
Prompt 3
How does the iTerm2 hotkey mode figure out which Claude session to fork?
Prompt 4
Show me how to name a forked session instead of using the auto-generated name.

Frequently asked questions

What is branchnew?

A Mac command-line tool that splits your terminal and forks your current Claude Code session into a new independent pane.

What language is branchnew written in?

Mainly Shell. The stack also includes Shell, tmux, iTerm2.

How hard is branchnew to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is branchnew for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.