Skip to main content

git-muster

CI PyPI Python 3.13–3.14 MIT License

Every branch, present and accounted for.

Git Muster is a compact command-line report for local Git branches. It separates worktree dirtiness from committed branch state, identifies what is published and what needs attention, shows linked worktrees, and adds pull-request status when the GitHub CLI is available.

project :: feature/report
worktree, clean
--------------------------------------------------------------------------------
BRANCH (4 local)      REMOTE  STATE          WORKTREE       UPDATED  PULL REQUEST
  main                origin  ↓ behind 2     main-release   3h       -
▸ feature/report      origin  ↑ ahead 1      -              12m      #42 approved
  fix/parser          origin  ✓ in sync      -              2d       #39 merged
  experiment          -       · local only   -              1w       -
--------------------------------------------------------------------------------
1 other linked worktree:
  main → /worktrees/project/main-release
✓ working tree clean
1 with unpushed commits · 1 behind · 1 local only

Features

  • One scannable report covering every local branch.
  • Publication state derived independently from the configured upstream.
  • Ahead, behind, diverged, local-only, and remote-gone states.
  • Conditional linked-worktree names and checkout paths.
  • Draft, open, approved, changes-requested, merged, and closed GitHub pull requests.
  • Clickable, underlined PR numbers in supported interactive terminals.
  • Responsive terminal layout plus stable plain output with ASCII interface glyphs for logs and pipes.
  • Read-only operation with --no-fetch; no branch switching, deletion, merging, rebasing, or pushing.

Requirements

  • Python 3.13 or 3.14
  • Git 2.23 or newer, for git branch --show-current and for-each-ref's %(worktreepath)
  • uv for the recommended installation
  • Optional: an authenticated GitHub CLI for pull-request information

Install

Install the latest release from PyPI:

uv tool install git-muster

Use uv tool upgrade git-muster to update an existing installation.

The installed commands are equivalent:

git-muster
gm
git muster

For development from a clone:

git clone https://github.com/olearydj/git-muster.git
cd git-muster
uv sync --locked --all-groups
uv run git-muster --help

Usage

Run the report from anywhere inside a Git repository:

git muster

By default, Git Muster runs git fetch --all --prune --quiet before reporting so remote-tracking references are current. When that fetch fails, because the machine is offline or a remote no longer answers, the report still renders from the references already on disk and says that branch states may be out of date. Skip all network activity and repository mutation with:

git muster --no-fetch

Use ASCII without color or terminal hyperlinks for logs and pipes:

git muster --plain

The built-in help includes examples, effects, linked-worktree behavior, and a Rich branch-state reference:

git muster --help
git muster --version

Color, symbols, and width

Color, Unicode symbols, clickable repository identities, and clickable pull-request numbers appear when the report is written to an interactive terminal that can render them. GitHub repositories appear as owner / repository, with the owner and repository linked separately. The title includes [public], [private], or [internal] when GitHub reports visibility, [fork] when the repository is a fork, and [archived] when it is archived. A fork label links to its parent repository. Git Muster resolves the repository from origin, or another GitHub remote when origin is not hosted there, and honors the usual overrides:

Variable Effect
NO_COLOR Disables color; symbols and layout are unchanged.
FORCE_COLOR, CLICOLOR_FORCE Keep color when output is redirected to a file or pipe.
COLUMNS Overrides the detected terminal width used to fit columns.

--plain overrides all of them and uses ASCII interface glyphs without color or terminal hyperlinks. Repository-provided text, including branch, remote, and worktree names, is preserved and may contain Unicode. Git Muster also falls back to the ASCII glyph set on its own whenever the destination stream cannot encode its symbols, so its built-in decorations never cause an encoding failure.

Reading the report

Column Meaning
BRANCH Local branch name; the leading marker identifies the current branch.
REMOTE Push remote or matching remote branch; - means no current publication relationship.
STATE Ahead/behind relationship between the local branch and its publication branch.
WORKTREE Directory holding the branch when it is checked out elsewhere; omitted when none exist.
UPDATED Relative date of the branch tip.
PULL REQUEST Optional GitHub PR number and normalized state.

Publication is deliberately separate from Git's configured upstream. A branch is recognized as published when it has a push destination or matching remote branch, even if it has no upstream or tracks a local parent branch. Git Muster retains both relationships internally but reports publication state by default.

State Meaning
in sync Local and remote branch tips agree.
ahead N Local commits have not been pushed.
behind N Remote commits are missing locally.
ahead N, behind M Local and remote histories have diverged.
remote gone A configured same-name push or upstream branch no longer exists remotely.
local only No push destination or matching remote branch currently exists. This does not claim the branch was never published.

When another linked worktree holds a branch, Git Muster shows its directory in the table and lists the full checkout path below it. It does not scan those other worktrees for dirtiness or change them.

GitHub integration uses one gh repo view query for canonical identity, visibility, fork parent, and archive state, plus one optional gh pr list --state all --limit 100 query for pull requests. A branch whose pull request falls outside the hundred most recent is reported without pull-request state. When several pull requests share a head branch, the newest open, draft, approved, or changes-requested one wins over closed and merged ones. Without an installed and authenticated gh, or when no remote points at a known GitHub host, the complete Git report still works, falls back to identity parsed from the remote URL, omits metadata it cannot establish, and names the reason pull-request state is missing.

Safety and scope

Git Muster reports; it does not manage branches or worktrees. It never switches, deletes, merges, rebases, or pushes branches. Its only default repository mutation is refreshing remote-tracking references with git fetch --all --prune; --no-fetch makes the entire run read-only.

Git Muster intentionally has no configuration file, interactive browser, branch tree, cleanup command, or plugin system.

Development

Runtime dependencies are limited to Typer and Rich. Repository inspection uses the standard library and Git CLI, while tests create disposable local repositories and stub GitHub responses.

uv sync --locked --all-groups
uv run --locked pytest
uv run --locked ruff format --check .
uv run --locked ruff check .
uv run --locked ty check
uv build

See CONTRIBUTING.md before opening a pull request. CI runs the same checks on Python 3.13 and 3.14.

Project documents

License

Git Muster is available under the MIT License.

Metadata

Release files for git-muster 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-muster 0.5.0
File Size Uploaded Provenance Actions
git_muster-0.5.0.tar.gz 14.9 kB With provenance Details for git_muster-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-muster 0.5.0
File Interpreter ABI Platform Actions
git_muster-0.5.0-py3-none-any.whl Python 3 none any Details for git_muster-0.5.0-py3-none-any.whl

Total release size: 31.2 kB

Release files / git_muster-0.5.0.tar.gz

Download URL git_muster-0.5.0.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
954987035dedacf6f70cd3cc5914e8b965105fd92c36dfdb96013dd06ab3ce69
BLAKE2b-256 checksum
How to use checksums
3fb25c4b09ec1f1dcdebdd023b0775c48d47aa7ea52f8ae3aeaba10f86bd2bb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / git_muster-0.5.0-py3-none-any.whl

Download URL git_muster-0.5.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
891a9726cf663fb2fc766c310ded9b147226c37d19309ed7d3e2a54ef6444d0c
BLAKE2b-256 checksum
How to use checksums
46c8cc2f4c1198b99036e9513655fc242ee65678d8da31c040c98d36cc40aced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Security for git-muster 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for git_muster-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page