You’ve typed this before. Let’s skip that part.
tabcat is a smart prompt for zsh and bash that learns your shell history. Tab through the familiar parts, type only what’s different.
npm install -g tabcatTry the prompt
- ❯ git checkout develop
- ❯ git checkout feature/login
- › git checkout shared start
- git checkout develop
- git checkout feature/login
Type git ch and press Tab: tabcat fills in the familiar start and stops where your branches differ.
How tabcat completes
Chunks, not whole lines.
Tab stops where your commands go separate ways. → takes one chunk, ⇧ Tab takes it back.
Your context first.
Recent and frequent commands rank higher, and commands you ran in this directory get a head start.
Stays on your machine.
Learning and prediction run locally. No cloud model, no account, no telemetry.
Long command. Short name.
Some commands deserve a place in your workflow, not in your memory. Type the command, press Ctrl N, give it a name, and Ctrl S saves it without running.
Next time, type the name and press Tab: the full command comes back to inspect, extend or run. The exact name plus Enter runs it straight away.
Today, in ~/projects/shop
❯ docker compose -f compose.dev.yaml run --rm php vendor/bin/phpstan analyze src
⚡ analyzehere · ^G: global · ^S: save
Tomorrow, same project
❯ analyze
› ⚡ analyze docker compose -f compose.dev.yaml run --rm php vendor/bin/phpstan analyze src
Here, or everywhere.
Every name has a scope. You choose it in the naming badge with Ctrl G; the badge says here or GLOBAL, so you always know which one you’re saving.
Here default
The name belongs to the directory you created it in, so relative paths keep pointing at the right place. Every project can have its own analyze, up or test.
~/projects/shop analyze → phpstan
~/projects/blog analyze → npm run lint
Everywhere Ctrl G
A global name works in every directory. Use it for commands that don’t depend on where you are, like claude --model haiku as haiku.
Same name in both scopes? The local one wins in its directory; everywhere else, the global one applies.
Changing your mind later: type the name, Tab to expand, Ctrl N, switch with Ctrl G, save with Ctrl S. :names lists them all, Ctrl X forgets one. Scope in the guide
The keys, all of them.
Four cover the basics: Tab, →, ⇧ Tab and Ctrl R. Type :help in the prompt to see this list there.
In the zsh plugin, Tab, → and ⇧ Tab work the same; naming and search use the Ctrl X family so your zsh shortcuts stay yours. Plugin keys
Complete
- Tab
- Accept the selected suggestion
- →
- Accept one chunk
- ⇧ Tab
- Undo the last accept
- ↑ ↓
- Move through suggestions
- Esc
- Close the suggestions
History
- Ctrl R
- Fuzzy history search
- ↑ ↓
- On an empty line: browse history, filtered once you type
Names
- Ctrl N
- Name this command
- Ctrl G
- In the badge: here ⇄ everywhere
- Ctrl S
- In the badge: save without running
- Ctrl X
- Forget the shown name
Leave
- Ctrl C
- Clear the current input
- Ctrl D
- Quit to your regular shell
Bring your history. Keep your shell.
Try it without touching your shell config. When tabcat has earned a place, one block in ~/.zshrc makes it start with every terminal.
Just looking? Run npx tabcat import, then npx tabcat. Nothing is installed globally.
Install tabcat
npm install -g tabcatImport your shell history
tabcat importReads
~/.zsh_historyor~/.bash_history, so suggestions work from the first keystroke.Open the prompt
tabcatCtrl D takes you back to your regular shell, any time.
Make it stick optional
Add this to the end of
~/.zshrcor~/.bashrc. Every new terminal opens tabcat; Ctrl D or:exitdrops you into your regular shell.if [[ $- == *i* ]] && [[ -z "$TABCAT_AUTOSTART" ]] && command -v tabcat >/dev/null; then export TABCAT_AUTOSTART=1 command tabcat repl fiThe guard keeps nested shells and the commands tabcat runs from starting it again. Lazy-loading nvm? Put Node’s
bindirectory onPATHbefore this block. Autostart guidePrefer your own zsh session? The plugin adds ghost text and Tab right there, and shares everything tabcat has learned.
tabcat plugin init zshAdd the
sourceline it prints to~/.zshrc. zsh only; on bash, use the prompt. Plugin guide
Before you ask.
Does this replace my shell?
No. tabcat is a smart prompt, not a persistent shell session. Each command runs in its own shell: directory changes carry over, while exports, functions and aliases you define during a session last for that one command. Aliases from your startup config are imported at launch. More about shell sessions
What about my virtualenv or nvm use?
Commands inherit the environment tabcat starts with, so activate first and then open the prompt. Activating inside the prompt only lasts for that one command. If you need a long-lived, changing environment, the zsh plugin keeps you in your own session.
Where does my history go?
Nowhere. Commands and magic names live under ~/.config/tabcat/. Treat those files like shell history: arguments can contain secrets. Imported history has no directory information; tabcat learns that as you use it. Storage details
How do I undo all of it?
Remove the autostart block or plugin line from ~/.zshrc, run npm uninstall -g tabcat, and delete ~/.config/tabcat/ to forget what it learned.
Is there a macOS app?
There’s a macOS overlay in beta for running a command without opening a terminal first. It uses the same prediction engine.