~/sift

What Sift does

Sift reads a copy of your shell history and finds the commands you type over and over. For every repeated command it writes the alias or shell function you would have written yourself, then ranks them by how many keystrokes each one saves across all the times you have already run it. Copy the ones you want into your .zshrc or .bashrc and stop retyping them.

It is built for anyone who has spent a few years in the same terminal and built up habits without automating them: a git log incantation with six flags, a docker run with the same mounts and ports, an ffmpeg transcode. You know you should alias those. Sift works out which ones are actually worth it.

How to use it

  1. Find your history file: ~/.zsh_history or ~/.bash_history.
  2. Drop it onto the terminal panel above, or use the file picker.
  3. Nudge the minimum-occurrences and minimum-savings inputs to cut noise.
  4. Click Copy on any row and paste the line into your shell config.

Questions

Is my shell history uploaded anywhere?

No. Sift is a Go program compiled to WebAssembly that runs inside your browser tab. Your file is read locally and never sent over the network. Open your browser's network panel while you use it: there is no request.

Does it work with both zsh and bash?

Yes. It parses plain .bash_history and zsh history in both its plain and EXTENDED_HISTORY (timestamped) forms, and it stitches back together commands that span multiple lines with a trailing backslash.

What about a command whose argument changes every time?

That becomes a shell function instead of a plain alias. Sift groups commands that share every token except the last, so fifty git commit -m "..." lines with fifty different messages count as one candidate and get a function with a $1 parameter.

Could it leak a password that was on the command line?

No. Any command that looks like it carries an inline credential (a --password, --token, --api-key, or a mysql -p<value> style flag) is dropped before proposals are built, so a copied snippet never bakes in a secret.

How is "keystrokes saved" calculated?

For each proposal it is the length of the command minus the length of the short alias name, multiplied by the number of times you ran it. Every row shows the exact numbers behind its total.