Skip to main content

git-muster

CI 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 ASCII output 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
  • uv for the recommended installation
  • Optional: an authenticated GitHub CLI for pull-request information

Install

Install the latest version directly from GitHub:

uv tool install git+https://github.com/olearydj/git-muster.git

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. 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

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 optional gh pr list query. Without an installed and authenticated gh, the complete Git report still works and explains why PR status is unavailable.

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.

License

Git Muster is available under the MIT License.

Download files

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

Source Distribution

git_muster-0.3.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

git_muster-0.3.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file git_muster-0.3.1.tar.gz.

File metadata

  • Download URL: git_muster-0.3.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for git_muster-0.3.1.tar.gz
Algorithm Hash digest
SHA256 caac0b2bc7491d0f069eb7288e47fd94c8862cd6e854c724a1c5dee5be09ea87
MD5 ce567e794dd3ef929dc3d64f2216189c
BLAKE2b-256 0d292b94a3201fed2109a4062b1e72b4693e49417fff27a5d3e6be22389c2cc8

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_muster-0.3.1.tar.gz:

Publisher: publish-pypi.yml on olearydj/git-muster

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file git_muster-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: git_muster-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for git_muster-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ecf5e9f6cd07836d81dcc7e831d7d8665e482f92285225a6b7606a5f0e0bd39
MD5 f72cc39ce2ff6d5750b5b5e6e96fe3e8
BLAKE2b-256 ccee2a496a03b12853b3356b464781ebe8c21e0453ec10ab880643e3e661fff3

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_muster-0.3.1-py3-none-any.whl:

Publisher: publish-pypi.yml on olearydj/git-muster

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

This release

0.3.1 This release

2 files

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