Skip to content
Back to search

git-branchline

MarketplaceWorks with Claude CodeGitHub

Branchline: a live Git history pane beside the chat, for Claude Code

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/dvalfrid--git-branchline/badge.svg)](/listings/dvalfrid--git-branchline)

HTML

<a href="/listings/dvalfrid--git-branchline"><img src="/api/listings/dvalfrid--git-branchline/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

At the prompt of a Claude Code terminal session:

/plugin install git-branchline --marketplace dvalfrid/git-branchline

Answer `y` to add the marketplace, then pick a scope (user scope loads it in every session).

From a shell:

claude plugin install git-branchline --marketplace dvalfrid/git-branchline

In the Claude desktop app, where `/plugin` does not run:

1. Open **Plugins**: in the left sidebar, or under **Settings** → **Plugins**, depending on the app's version. Press **Add**, then **Add marketplace** and **Add from a repository**.

2. Enter `dvalfrid/git-branchline` as the URL and press **Sync**.

3. The **Directory** opens on the marketplace. Pick **Branchline** (or press its **+**).

4. Choose **Install** → **Install for me** to have it in every project on this machine, or a project scope to share it through `.claude/` or keep it in `.claude.local/`.

A plugin installed from a terminal at the user scope also loads in the desktop app.

The install clones over SSH and falls back to HTTPS, so no GitHub key is needed. It may say that two userConfig options are not set: both have defaults (see Settings), so there is nothing to configure.

Requires Git on `PATH`. Git 2.41 or later reads ahead/behind counts in one call; older versions fall back to one `rev-list` per branch, which takes seconds in a repository with hundreds of branches. Tried with Git 2.56.

Needs Claude Code 2.1.326 or later, the version it is tried with in the desktop app and the terminal. An older version may lack parts of the mod API, and the pane then does not load. The mod API also changes between versions: if a newer Claude Code breaks Branchline, say so in an issue.

Update and uninstall

A new release reaches you when you ask for it, then restart Claude Code:

claude plugin update git-branchline@git-branchline

To remove it:

claude plugin uninstall git-branchline@git-branchline
claude plugin marketplace remove git-branchline

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 21 lines
  1. {
  2. "name": "git-branchline",
  3. "description": "Branchline: a live Git history pane beside the chat, for Claude Code",
  4. "owner": {
  5. "name": "Code By AB",
  6. "url": "https://codeby.se"
  7. },
  8. "plugins": [
  9. {
  10. "name": "git-branchline",
  11. "displayName": "Branchline",
  12. "description": "A live Git history pane beside the chat: branches, tags, HEAD, and how each branch stands against main",
  13. "source": {
  14. "source": "github",
  15. "repo": "dvalfrid/git-branchline",
  16. "ref": "v0.3.2"
  17. },
  18. "version": "0.3.2"
  19. }
  20. ]
  21. }
README.md · README · 180 lines
  1. # Branchline
  2. [![Checks](https://github.com/dvalfrid/git-branchline/actions/workflows/checks.yml/badge.svg)](https://github.com/dvalfrid/git-branchline/actions/workflows/checks.yml)
  3. [git-branchline.codeby.se](https://git-branchline.codeby.se)
  4. `git-branchline` is a Claude Code mod that shows the Git history of the
  5. session's repository in a pane beside the chat: branches, tags, remotes,
  6. where `HEAD` is, and how each branch stands against the default branch. The
  7. pane updates by itself when the history changes: a commit, fetch, pull,
  8. checkout or merge, whether Claude ran it or you did in a terminal or another
  9. Git client.
  10. ![The Branchline graph updating as commits, a merge and new branches land](docs/branchline.gif)
  11. ## Features
  12. - **Graph tab**: the commit graph, colored by branch, with ref pills, `HEAD`
  13. marked and hover tooltips. Long quiet stretches fold into one row when the
  14. graph does not fit, and commits only a tag keeps are hidden; two check
  15. boxes change both (see Settings).
  16. - **Branches tab**: branches grouped as Active, Local and remote, Remote only
  17. and Old local, with age, ahead/behind bars and status, the first 30 of a
  18. group at a time. Open a branch to see its commits and most changed files,
  19. ask Claude about it, copy its name, or delete it.
  20. - **A row above the prompt** opens the pane while it is closed, with the
  21. checked-out branch and how it stands against the base.
  22. - **Terminal**: a text graph in the style of `git log --graph`.
  23. - `/branchline` opens the pane and reads the repository again.
  24. <img src="docs/screenshot-graph.png" width="420" alt="The Graph tab in the Claude desktop app: a repository with several branches, release tags and folded stretches"> <img src="docs/screenshot-branches.png" width="420" alt="The Branches tab: active branches with HEAD marked, how far each is behind and ahead of main, and branches that are only on the remote">
  25. Branchline only reads the repository. The one exception: it can delete a
  26. **merged local** branch with `git branch -d` (which refuses unmerged work),
  27. after two presses. Anything else that changes the repository, such as
  28. `git branch -D` or deleting a branch on a remote, is handed to Claude as a
  29. prompt for you to send, and runs with Claude's usual permission prompts.
  30. ## Try it
  31. In any session whose folder is a Git repository:
  32. - Type `/branchline`. The pane opens on the Graph tab and shows the history.
  33. - Ask Claude to "make a branch called demo and commit a small change on it".
  34. The new branch and its commit appear in the graph as the commit lands.
  35. - Open the **Branches** tab and press a branch: its commits and most changed
  36. files show, with buttons to ask Claude about it or copy its name.
  37. - Ask Claude "which of my branches are merged into main?", then delete one
  38. of them from the Branches tab with **Delete** and the confirmation.
  39. ## Install
  40. At the prompt of a Claude Code terminal session:
  41. ```
  42. /plugin install git-branchline --marketplace dvalfrid/git-branchline
  43. ```
  44. Answer `y` to add the marketplace, then pick a scope (user scope loads it in
  45. every session).
  46. From a shell:
  47. ```
  48. claude plugin install git-branchline --marketplace dvalfrid/git-branchline
  49. ```
  50. In the Claude desktop app, where `/plugin` does not run:
  51. 1. Open **Plugins**: in the left sidebar, or under **Settings** → **Plugins**,
  52. depending on the app's version. Press **Add**, then **Add marketplace**
  53. and **Add from a repository**.
  54. <img src="docs/install-1-add-marketplace.png" width="430" alt="The Add marketplace dialog: Browse Anthropic sources, or Add from a repository">
  55. 2. Enter `dvalfrid/git-branchline` as the URL and press **Sync**.
  56. <img src="docs/install-2-repository.png" width="430" alt="The Add marketplace dialog with a URL field for a GitHub owner/repo or a Git URL">
  57. 3. The **Directory** opens on the marketplace. Pick **Branchline** (or press its
  58. **+**).
  59. <img src="docs/install-3-directory.png" width="700" alt="The plugin Directory showing the git-branchline marketplace and its Branchline plugin">
  60. 4. Choose **Install** → **Install for me** to have it in every project on
  61. this machine, or a project scope to share it through `.claude/` or keep
  62. it in `.claude.local/`.
  63. <img src="docs/install-4-install.png" width="700" alt="The plugin in the Directory with the Install menu open: Install for me, Install for project (shared), Install for project (personal)">
  64. A plugin installed from a terminal at the user scope also loads in the
  65. desktop app.
  66. The install clones over SSH and falls back to HTTPS, so no GitHub key is
  67. needed. It may say that two userConfig options are not set: both have
  68. defaults (see Settings), so there is nothing to configure.
  69. Requires Git on `PATH`. Git 2.41 or later reads ahead/behind counts in one
  70. call; older versions fall back to one `rev-list` per branch, which takes
  71. seconds in a repository with hundreds of branches. Tried with Git 2.56.
  72. Needs Claude Code 2.1.326 or later, the version it is tried with in the
  73. desktop app and the terminal. An older version may lack parts of the mod API,
  74. and the pane then does not load. The mod API also changes between versions:
  75. if a newer Claude Code breaks Branchline, say so in an issue.
  76. ### Update and uninstall
  77. A new release reaches you when you ask for it, then restart Claude Code:
  78. ```
  79. claude plugin update git-branchline@git-branchline
  80. ```
  81. To remove it:
  82. ```
  83. claude plugin uninstall git-branchline@git-branchline
  84. claude plugin marketplace remove git-branchline
  85. ```
  86. ## Known issues
  87. - In the desktop app, after a click in the pane, it can stop scrolling a
  88. couple of rows short of its top while it holds the keyboard. Press Esc (the
  89. pane says so). Reported as
  90. [anthropics/claude-code#111465](https://github.com/anthropics/claude-code/issues/111465).
  91. - In VS Code, a pane cannot be scrolled from code
  92. ([anthropics/claude-code#104733](https://github.com/anthropics/claude-code/issues/104733)).
  93. Branchline has not been tried there yet.
  94. - In the Claude mobile app, following a session on your computer through
  95. Remote Control, `/branchline` works (it answers "Branchline updated.") but
  96. the pane is not shown: the app has no place for a mod's pane there. Use the
  97. desktop app or the terminal to see it.
  98. ## Settings
  99. Two settings, kept between sessions. Change them with the two check boxes
  100. beside the tabs in the pane. Their defaults are the plugin's options, set
  101. with `claude plugin configure git-branchline@git-branchline` (stored under
  102. `pluginConfigs` in `~/.claude/settings.json`); a change made in the pane wins
  103. over them:
  104. | Setting | Values | Default |
  105. |---|---|---|
  106. | `foldQuietStretches` | `auto` (only when the graph does not fit), `always`, `never` | `auto` |
  107. | `showTagOnlyCommits` | `true`, `false` | `false` |
  108. Unchecked, **Fold quiet stretches** never folds; checked, it folds when the
  109. graph does not fit (`auto`), or always if the default says `always`. A
  110. folded row lists its commits when you hover it.
  111. ## Develop
  112. ```
  113. git clone https://github.com/dvalfrid/git-branchline
  114. claude --plugin-dir ./git-branchline
  115. ```
  116. The folder is watched, and the mod reloads when you save. In the desktop app,
  117. add the folder to `CLAUDE_CODE_PLUGIN_DIRS` in the `env` block of
  118. `~/.claude/settings.json` (and `"CLAUDE_CODE_PLUGIN_DIR_WATCH": "1"`), then
  119. quit the app fully and start it again.
  120. Checks:
  121. ```
  122. claude plugin validate .
  123. claude plugin test .
  124. node scripts/check.mjs
  125. npx -p typescript@5 tsc -p .
  126. ```
  127. See [CONTRIBUTING.md](CONTRIBUTING.md) for how the code is laid out and how
  128. to send a change, and [ROADMAP.md](ROADMAP.md) for what is planned and why
  129. things are the way they are.
  130. ## License
  131. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.