janitor

package module
v0.0.0-...-ddec407 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 0 Imported by: 0

README

git-janitor

A janitor for my git repos.

Mascot

Primer

git-janitor is a local tool that monitors your git repositories cloned locally.

Monitoring local clones

The janitor explores your local git clones and monitor their staleness, status, etc

  • keep fresh
  • git remotes monitor
  • monitor stale branches
  • monitor stashes
  • rebase branches
  • push local-only branches
  • monitor size
  • alert on branches that can't be rebases / merged
  • monitor worktrees
  • monitor activity
Monitoring forks
  • keep fork for up-to-date (merge)
github monitoring
  • issues
  • PRs
  • security alerts
  • deviations from confif template
  • ...
Schedule actions
UX
  • Interactive menu with arrow key navigation
  • Selection with space bar
  • Action execution with enter key
  • "/" commands

Running the App

# Build the application
go install github.com/fredbi/git-janitor/...@latest

# Run the application
git-janitor
Controls
  • tab/Shift-tab: cycle panel
  • left/right Control-A: cycle tab
  • /k - Move cursor up
  • /j - Move cursor down
  • space - Toggle selection
  • enter - Perform action
  • q - Quit application

Configuration

Documentation

Overview

Package janitor offers a TUI to interact with your git repositories.

Directories

Path Synopsis
cmd
git-janitor command
internal
engine
Package engine provides the orchestrator that connects configuration to check evaluation, data collection, and action execution.
Package engine provides the orchestrator that connects configuration to check evaluation, data collection, and action execution.
fs
Package fs exposes the functionality that interacts with the local file system.
Package fs exposes the functionality that interacts with the local file system.
git
Package git provides built-in git checks that evaluate backend.RepoInfo and produce alerts for the models.
Package git provides built-in git checks that evaluate backend.RepoInfo and produce alerts for the models.
git/backend
Package backend runs git CLI commands against local repositories.
Package backend runs git CLI commands against local repositories.
github
Package githubactions provides built-in GitHub actions that execute via the GitHub API in response to alert suggestions.
Package githubactions provides built-in GitHub actions that execute via the GitHub API in response to alert suggestions.
github/backend
Package backend provides a GitHub API client for git-janitor.
Package backend provides a GitHub API client for git-janitor.
ifaces
Package ifaces declares the interfaces exposed by the different internal packages.
Package ifaces declares the interfaces exposed by the different internal packages.
models
Package models holds the pivot data types used to convey data between the different internal package.
Package models holds the pivot data types used to convey data between the different internal package.
quickactions
Package quickactions implements user-configured shell commands that can be launched on demand from the TUI via the quick-actions popup (Ctrl+K).
Package quickactions implements user-configured shell commands that can be launched on demand from the TUI via the quick-actions popup (Ctrl+K).
registry
Package registry implements in-memory registries for checks and actions.
Package registry implements in-memory registries for checks and actions.
store
Package store exposes an interface to work with a persistent key-value store for caching, action history, and alert state.
Package store exposes an interface to work with a persistent key-value store for caching, action history, and alert state.
store/bolt
Package bolt implements store.Store using bbolt (etcd-io/bbolt), a single-file B+ tree key-value database.
Package bolt implements store.Store using bbolt (etcd-io/bbolt), a single-file B+ tree key-value database.
ux
ux/commands
Package commands implements a command text zone for the user to enter "slash-commands" directly, such as "/config", "/help" etc.
Package commands implements a command text zone for the user to enter "slash-commands" directly, such as "/config", "/help" etc.
ux/commands/config-wizard
Package wizard brings to life the UX to interact with the main configuration file.
Package wizard brings to life the UX to interact with the main configuration file.
ux/commands/scan
Package scan provides the /scan command that discovers git repositories under configured root directories.
Package scan provides the /scan command that discovers git repositories under configured root directories.
ux/key
Package key centralizes key binding definitions for the TUI.
Package key centralizes key binding definitions for the TUI.
ux/panels
Package panels provides shared utilities for TUI sub-panels.
Package panels provides shared utilities for TUI sub-panels.
ux/panels/infos/tab-worktrees
Package worktrees renders the list of git worktrees attached to the selected repository.
Package worktrees renders the list of git worktrees attached to the selected repository.
ux/panels/repos
Package repos implements the tabbed left panel where each tab represents a configured root directory.
Package repos implements the tabbed left panel where each tab represents a configured root directory.
ux/statusbar
Package statusbar brings to life the "status bar" at the bottom of the UX.
Package statusbar brings to life the "status bar" at the bottom of the UX.
ux/types
Package types defines shared data types for the ux sub-packages.
Package types defines shared data types for the ux sub-packages.

Jump to

Keyboard shortcuts

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