gbx

command module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 2 Imported by: 0

README

gbx

Manage your fleet of git repos with a pretty TUI.

CI Release Go Reference

gbx overview

gbx (git batch executor) is a terminal UI for everyone juggling a directory full of git checkouts — microservices, monorepo siblings, a folder of cloned projects. It shows the branch, ahead/behind, and dirty state of every repo at once, lets you filter or search the list with an fzf-style query, and runs a fixed set of non-destructive git commands across whatever repos currently match.

Install

Homebrew (macOS & Linux):

brew install deemson/tap/gbx

Go:

go install github.com/deemson/gbx@latest

Prebuilt binaries: grab a tar.gz for your platform (macOS / Linux, amd64 / arm64) from the latest release, extract it, and put gbx on your PATH.

Usage

Run gbx in a directory that contains git repositories. It scans the immediate subdirectories (a flat, non-recursive scan), and lists the ones that are repos with their current branch, ahead/behind counts, and working-tree changes.

From the list, single keys run a git command across every repo currently matching the filter:

key action
r refresh status
f fetch
p pull (fast-forward only)
s switch to a branch
b create and switch to a new branch
enter open the actions menu for the repo at the cursor
ctrl+f open the filter prompt
ctrl+s open the search prompt (jump the cursor to matches)
? show all key bindings
q quit

Every command is non-destructive — there is no force-push, reset, or anything that throws away work. Press ? in the app for the complete, always-current key reference.

Both the filter and the search prompt take the same query — a space-separated list of terms, all ANDed together; a repo matches only if every term matches:

term matches
foo fuzzy match
^foo starts with foo
foo$ ends with foo
!foo exclude foo

By default terms match against the repo name or branch. ctrl+2 restricts matching to the name, ctrl+3 to the branch, and ctrl+1 returns to both — in either prompt.

Filter (ctrl+f) narrows the list to the matching repos; the git commands then run across exactly that set. Search (ctrl+s) leaves every repo visible and instead jumps the cursor to the matches, dimming the rest — / walk between them. Filter is for acting on a subset; search is for finding one repo in a list you want to keep whole.

Configuration

gbx works with no config at all. Configuration only customizes the actions menu — the tools you can launch in the cursored repo with enter. By default that menu offers lazygit and your shell.

Write the default config (and a companion JSON schema for editor validation) to $XDG_CONFIG_HOME/gbx/config.toml (i.e. ~/.config/gbx/config.toml):

gbx config write-default

It looks like this:

#:schema ./schema.json
[[actions]]
label = 'lazygit'
command = ['lazygit']

[[actions]]
label = 'shell'
command = ['{{ env.SHELL }}']

(The #:schema line points editors like Taplo at the companion schema.json written alongside it, for live validation and completion.)

Each action is a label plus an argument vector run in the cursored repo's directory (it takes over the terminal until it exits). {{ env.NAME }} expands to the environment variable NAME; an unset variable or unknown placeholder aborts the action rather than running the wrong command. Up to 9 actions are supported (bound to digits 19).

Requirements

  • git must be on your PATHgbx shells out to it for everything.
  • lazygit is optional, needed only if you keep the default lazygit action.

Releases

Binaries and per-release changelogs live on the Releases page.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
clilog
Package clilog is the stdout/stderr logger for the cobra/config layer only.
Package clilog is the stdout/stderr logger for the cobra/config layer only.
cmd
cmdxtmpl
Package cmdxtmpl expands fasttemplate tags ({{ }}) in command argument vectors, delegating each tag to a caller-supplied resolver.
Package cmdxtmpl expands fasttemplate tags ({{ }}) in command argument vectors, delegating each tag to a caller-supplied resolver.
demo
Package demo holds the generator for the throwaway tree of git repositories the README's VHS demo films against.
Package demo holds the generator for the throwaway tree of git repositories the README's VHS demo films against.
git
tui
xdg
Package xdg resolves config/state file paths using the freedesktop base-dir layout on every platform (unlike github.com/adrg/xdg, which follows Apple's ~/Library/Application Support convention on macOS).
Package xdg resolves config/state file paths using the freedesktop base-dir layout on every platform (unlike github.com/adrg/xdg, which follows Apple's ~/Library/Application Support convention on macOS).

Jump to

Keyboard shortcuts

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