Skip to main content
Menu
Open source·MIT·Built in Rust

Autocomplete for your terminal, in a dropdown.

As you type a command, hiruzen shows what the next word can be: subcommands, options, branches, files and scripts. You do not have to remember it.

brew install farhanmalhi/tap/hiruzen
700+
Command-line tools
4
Shells
0
Network requests

Typing git ch opens a dropdown with checkout, cherry-pick and branch, each with a short description.

How it works

Three sources, ranked together

Command specs

The valid subcommands, options and arguments of more than 700 command-line tools, embedded in the binary.

$ git commit --am
--amend

Live context

Values from your machine, read when they are needed: git branches, tags and changed files, the scripts in package.json.

$ git checkout
your branches

Your history

What you actually run moves to the top. If you always cherry-pick, it outranks checkout after you type git ch.

$ git ch
cherry-pick first

hiruzen starts your shell inside a pseudo-terminal and passes everything through to your real terminal. It draws the dropdown over the shell's output and restores what was underneath before the shell prints again, so the shell never sees a changed screen.

TabAccept the highlighted suggestion
↓ ↑Move the highlight
EscHide suggestions for the current word
EnterRun the command as typed
Install

Running in three steps

Step 1

Get the binary

brew install farhanmalhi/tap/hiruzen

macOS, and Linux with Homebrew.

Each release has prebuilt binaries for macOS (Apple silicon and Intel), Linux (x64 and arm64) and Windows (x64).

Step 2

Try it

Starts your shell with suggestions switched on and changes no files. Type exit to leave.

hiruzen
Step 3

Start it with every new terminal

Adds hiruzen to the startup file of every supported shell it finds. Open a new terminal afterwards. hiruzen uninstall removes exactly what this added.

hiruzen install
Also built in

Everything works locally

Settings and themes

One JSON file, changed with a command. Six dropdown themes: dark, light, dracula, nord, gruvbox and solarized.

hiruzen theme nord

Saved scripts

A saved command with named blanks. Run it by name and you are asked for each blank.

hiruzen run restart service=api

Shell plugins

Load prompts, aliases and functions into each new shell, from a git URL or a local directory.

hiruzen plugins add <url>

Measure accuracy

Replays the newest fifth of your own history and reports how often the right word was suggested first.

hiruzen evaluate

Doctor

Checks the installation, the settings file, each shell and the current terminal, and says how to fix what it finds.

hiruzen doctor
Shell support

Where it runs

ShellPlatformsStatus
zshmacOS, LinuxTested in live sessions
bashmacOS, Linux, Windows (Git Bash)Tested in live sessions on macOS and Linux
fishmacOS, LinuxTested in live sessions on Linux
PowerShell 7macOS, Linux, WindowsTested in live sessions on Linux
Windows PowerShell 5WindowsExperimental
cmdWindowsExperimental

The unit tests pass on macOS, Linux and Windows. On Windows the dropdown has not yet been tried in a live terminal, so treat Windows support as experimental. On macOS, fish and PowerShell 7 are not yet tested; the same scripts pass on Linux. Nushell, Xonsh and other shells are not supported.

Privacy and security

Offline by default

No network requests

hiruzen itself sends nothing anywhere. The completion specs are inside the binary.

What you type stays on your machine

Specs that would fetch suggestions from a registry or search service are refused unless you turn on autocomplete.onlineSuggestions.

History is read, never written

It reads the last 20,000 lines of your shell's history file at startup, keeps the session's commands in memory, and stores nothing on disk.

Spec code runs in a sandbox

Specs that compute suggestions with JavaScript run in an embedded engine with no file, network or timer access.

Live suggestions run read-only commands

Such as git, to list branches. Each one gets no input and is stopped after 3 seconds. A tool's own listing command may contact that tool's service: gh asks GitHub, kubectl asks your cluster.

Your shell always starts

If hiruzen cannot start, your shell opens as normal. Scripts and other non-interactive shells are not affected.

Claude Code plugin

So Claude does not guess at flags

The repository is also a Claude Code plugin marketplace. The plugin lets Claude look up a tool's valid subcommands and options before it writes a command. Install hiruzen first, then in Claude Code:

/plugin install hiruzen --marketplace farhanmalhi/hiruzen-cli
  • /hiruzen:cli-lookup

    Looks up what can follow a partly typed command. Claude also uses it on its own when unsure of a flag.

  • /hiruzen:setup

    Installs, checks or removes hiruzen and changes its settings. Runs only when you ask for it.

hiruzen also completes the claude command itself in your terminal: its options, subcommands, and values such as --permission-mode.

FAQ

Questions? Answers

Does hiruzen send what I type anywhere?

No. hiruzen makes no network requests, and the specs are inside the binary. Suggestions that a spec would fetch from the network, such as package names from a registry, are off unless you turn on autocomplete.onlineSuggestions. A tool's own listing command may contact that tool's service: gh asks GitHub for your repositories, kubectl asks your cluster.

Is it a replacement for Fig?

Only for autocomplete. hiruzen reuses the open-source spec library from Fig, later Amazon Q Developer CLI, but it has no accounts, cloud sync, AI command generation or team features. It is fully offline by default.

Does it work on Windows?

It builds and passes its unit tests on Windows for PowerShell, Git Bash and cmd, but the dropdown has not yet been tried in a live Windows terminal. Treat Windows support as experimental for now.

Are the suggestions always right?

They are valid and well ranked, not guaranteed correct: where several words are valid, hiruzen cannot know which one you intend. Run hiruzen evaluate to measure how often the right word comes first against your own history.

Where do suggestions appear?

At a shell prompt, with the cursor at the end of what you have typed. They are hidden inside full-screen programs such as vim and less, and in a pipeline only the last command is completed.

Can I change the keys?

Not yet. Tab accepts, Up and Down move the highlight, Esc hides the dropdown, and Enter runs the command as typed. When no suggestions are showing, every key goes to your shell unchanged.

How do I remove it?

Run hiruzen uninstall, open a new terminal, then remove the binary the way you installed it, for example brew uninstall hiruzen.

Try it in your own terminal

hiruzen is free and open source under the MIT licence. If a tool gives no suggestions, or wrong ones, open an issue.

The completion specs come from Fig's open-source spec library, and the approach and shell integration scripts are adapted from Microsoft's inshellisense. Both are MIT licensed.