.shwind (shell rewind) is a companion for your command line.
It reads the logs your shell and tools already leave behind, your shell history, your
git logs, and more, then turns them into an on-demand dashboard of your terminal life,
topped with a year(ish)-in-review reel. Spotify Wrapped, but for your CLI.
Nothing to set up before your first look. Works on all major shells.
Getting started • Installation • Configuration • What it reads
shwind # open the dashboard in your browser (built from whatever logs it finds)
shw # same thing, fewer keystrokes
shw generate # (re)build your stats and Wrapped from the logs available right now
shw wrapped # your CLI Wrapped, the year(ish)-in-review reel
shw stats # on-demand breakdowns: busiest repos, branches, and commands
shw top # your most-run commands, ranked
shw heatmap # when you're at the keyboard, by hour and weekday
shw sources # show which logs shwind found and is reading
shw init zsh # optional: turn on the collector for richer data going forward.shwind works the moment it's installed because it reads logs you already have. Want sharper
numbers (command durations, exit codes, which repo a command ran in)? Turn on the optional
collector and it enriches everything from that point on.
.shwind installs in 2 easy steps (3 if you want the good stuff):
-
Install the binary
The command is
shwind, orshwif you prefer fewer keystrokes. It runs on most major platforms; if yours isn't listed, please open an issue.Linux / macOS / WSL
The quickest way is the install script:
curl -sSfL https://raw.githubusercontent.com/hhcsoftware/shwind/main/install.sh | shOr, if you have a Go toolchain (1.22+):
go install github.com/hhcsoftware/shwind/cmd/shwind@latest
Or grab a prebuilt binary from the releases page and drop it on your
PATH.Windows
.shwindworks with PowerShell, as well as shells running in Git Bash and MSYS2.With a Go toolchain (1.22+):
go install github.com/hhcsoftware/shwind/cmd/shwind@latest
Or download a prebuilt binary from the releases page and put it on your
PATH.From source
Needs a Go toolchain (1.22+). The web dashboard is embedded into the binary at build time, so no Node is required to run it.
git clone https://github.com/hhcsoftware/shwind cd shwind make build # writes ./bin/shwind
Note: More package managers (Homebrew, Nix, the usual suspects) are on the list. PRs welcome.
-
Run it
shwind
This opens the dashboard at
http://localhost:7373, builds your Wrapped from whatever logs are available, and gets out of your way. No account, nothing to configure. The terminal subcommands above show the same numbers if you'd rather not leave the shell. -
Turn on the collector (optional)
Existing logs are enough to get started, but they're patchy: shell history rarely records how long a command took, what it exited with, or which directory it ran in. The collector fills those gaps for everything you do from here on.
Bash
Add this to the end of your config file (usually
~/.bashrc):eval "$(shwind init bash)"
Fish
Add this to the end of your config file (usually
~/.config/fish/config.fish):shwind init fish | source
PowerShell
Add this to the end of your config file (find it by running
echo $profilein PowerShell):Invoke-Expression (& { (shwind init powershell | Out-String) })
Zsh
Add this to the end of your config file (usually
~/.zshrc):eval "$(shwind init zsh)"
Note: The collector is deliberately boring. It appends a row to a local database and gets out of the way in a millisecond or two. It never phones home and never blocks your prompt.
When calling shwind init, the following flags are available:
-
--cmd- Changes the name of the command the collector wires up.
--cmd shwwould let you runshw wrapped,shw stats, and friends.
-
--hook <HOOK>-
Changes when the collector records a command:
Hook Description noneNever (you can still record manually) command(default)Around every command, capturing real duration and exit code
-
-
--no-hook- Prints the init script without installing the collector, in case you want to wire it up yourself.
Set these before shwind init is called.
-
SHWIND_DATA_DIR-
Where the local database and generated snapshots live.
.shwindnever writes anywhere else by default. -
Defaults follow each platform's conventions:
OS Path Example Linux / BSD $XDG_DATA_HOMEor$HOME/.local/share/home/alice/.local/share/shwindmacOS $HOME/Library/Application Support/Users/Alice/Library/Application Support/shwindWindows %LOCALAPPDATA%C:\Users\Alice\AppData\Local\shwind
-
-
SHWIND_REDACT-
Controls how much of each command is stored. Your shell history is sensitive, and
.shwindtreats it that way.Value Stored args(default)Command and arguments, with secret-looking tokens scrubbed commandJust the program name ( git,npm, and so on), no argsnoneNothing but timing, exit code, repo, and branch
-
-
SHWIND_IGNORE- Commands or globs to skip entirely, separated by OS path characters (
:on Linux/macOS,;on Windows). Example:clear:ls:* --password*.
- Commands or globs to skip entirely, separated by OS path characters (
-
SHWIND_SOURCES- Extra history or log files to read, beyond the ones
.shwindfinds automatically. Same separators as above.
- Extra history or log files to read, beyond the ones
-
SHWIND_PORT- Port for the dashboard. Defaults to
7373.
- Port for the dashboard. Defaults to
.shwind builds everything on demand from logs that already exist on your machine:
- Shell history, for zsh, bash, and fish, including timestamps where your shell records them.
- Git logs, across the repositories you've worked in, for commit cadence, branches, and busiest projects.
- The optional collector, once enabled, for the things history leaves out: command durations, exit codes, and the directory each command ran in.
Run shw sources to see exactly what was found. Every number is recomputed from these sources, so
you can change the rules, or turn the collector on later, and rebuild your history without losing
anything. Nothing leaves your machine.
Everything stays in a local database on your computer. There is no account, no telemetry, and no network call involved in reading your logs or building your Wrapped. If you ever want it gone:
shw nuke # delete the database and forget everythingNo hard feelings.