I, like a lot of developers, put all my git repositories in a single folder on my computer. (For me, that's $HOME/src
.) Sometimes my work leads me to making changes in a few different repositories on my machine during a single work session, and I often want to answer the question:
What are all the projects I just made changes in, and what un-pushed changes are in each?
Superstat is a tool I wrote to answer that question quickly and concisely. It runs git status + diff across every git repository in a folder, and presents a nice visual summary, like this:
Each line has the format repo | branch | date-when-I-last-worked-on-it
, followed potentially by a list of files with un-committed changes. The repo name is yellow if it has non-committed changes, and the branch name is red if it has commits that haven't been pushed upstream.
Typing superstat --help
tells us the following:
Superstat: git status + diff every repo in a workspace.
Usage
superstat [rootDir] [options]
Options
--[h]elp Show this help message
--[v]ersion Print version information and exit
--no-[c]olor Use letters instead of colors to indicate info
--no-[f]iles Do not list non-committed file changes
Legend
[repo-name] [branch] [last-worked-on-timestamp]
[non-committed-changes]
- repo-name is yellow (or followed by "*") if there are non-committed
changes.
- branch is red (or followed by "!") if there are unsynced changes (if
local is ahead of remote).
- If no rootDir is provided, Superstat falls back to $SUPERSTAT_ROOT
if defined in the environment.
If you keep all your git repositories in ~/workspace/
, for example, a basic usage looks like:
superstat ~/workspace
You can also set the SUPERSTAT_ROOT
environment variable to your git-repository folder to save yourself some typing every time you use Superstat:
# somewhere in your ~/.profile or ~/.bashrc
export SUPERSTAT_ROOT=~/workspace
# later, in your shell
superstat
Here are what the --no-color
and --no-files
options look like. When using --no-color
, instead of using text color to indicate each repo's status, Superstat uses little characters *
and !
.
The --no-files
option simply hides the lists of files with non-committed changes, for a more concise view that just shows which repos may need your attention.
If you have Oak installed, you can build from source (see below). Otherwise, I provide pre-built binaries for macOS (x86 and arm64) and Linux (x86) on the releases page. Just drop those into your $PATH
and you should be good to go.
Instructions for Mac (other systems will differ):
- Download the pre-built binary on the releases page
- Rename the binary from the download name (e.g.
superstat-macos-arm64
) to justsuperstat
- Make it executable by running
chmod +x superstat
(addsudo
to the beginning if it doesn't let you) - Move the binary to somewhere in your
$PATH
like/usr/local/bin/
- Restart Terminal
- Run
superstat
to get the security prompt that it can't run because the developer is unverified. Check the Security & Privacy section in System Preferences where it should prompt you to allowsuperstat
to run. If you runsuperstat
again it should work!
Superstat is built with my Oak programming language, and I manage build tasks with a Makefile.
make
ormake build
builds a version of Superstat at./superstat
make install
installs Superstat to/usr/local/bin
, in case that's where you like to keep your binsmake fmt
ormake f
formats all Oak source files tracked by Git