gh-sweep

module
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT

README

gh-sweep

Audit and clean up many GitHub repositories from the terminal: dead branches, unresolved review threads, branch-protection drift, and slow workflows. Every view works across an org or an explicit list of repos, so you never open one repo at a time.

Install

# GitHub CLI extension
gh extension install kyleking/gh-sweep
# Go
go install github.com/KyleKing/gh-sweep/cmd/gh-sweep@latest
# from source
go build -o gh-sweep ./cmd/gh-sweep

Quick start

Find every branch whose PR merged or closed, across a whole org, and preview the cleanup before deleting anything:

gh sweep orphans --org my-org --cleanup --dry-run

Run gh sweep with no arguments for the home menu, which reaches all thirteen views. Each view prints its keys along the bottom of the screen.

What it does not do

  • Update dependencies. Use Renovate or Dependabot
  • Touch issues. The orphan sweep covers branches only
  • Automate releases. The releases view reads release state and nothing more
  • Follow a CI run live. gha-perf reports history, so use watchgha to tail a run
  • Write anything in the webhooks, collaborators, secrets, or releases views, which are read-only. Repo settings, security & analysis, release immutability, and branch protection are the exception: gh sweep policy diffs and applies those against a file you declare (see docs/alternatives.md)

Full docs: ./docs

License

MIT

Directories

Path Synopsis
cmd
gh-sweep command
Package main implements gh-sweep: a Bubble Tea TUI gh extension for cross-repository GitHub maintenance.
Package main implements gh-sweep: a Bubble Tea TUI gh extension for cross-repository GitHub maintenance.
internal
cli
git
github
Package github wraps the GitHub REST and GraphQL APIs used by gh-sweep.
Package github wraps the GitHub REST and GraphQL APIs used by gh-sweep.
policy
Package policy diffs a config.PolicyConfig's declared repository state against live GitHub repos and applies it.
Package policy diffs a config.PolicyConfig's declared repository state against live GitHub repos and applies it.
tui
tui/components/policy
Package policy is the TUI view for the gh-sweep policy command: it shows drift between a config.PolicyConfig and live repos, and applies it on demand.
Package policy is the TUI view for the gh-sweep policy command: it shows drift between a config.PolicyConfig and live repos, and applies it on demand.
tui/theme
Package theme provides color theme detection and management for the TUI.
Package theme provides color theme detection and management for the TUI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL