CommandFixer
A lightweight Go binary that catches your common typing
mistakes in PowerShell before they run. Type git sattus,
press Enter, and it swaps in git status, then runs it, once
you approve.
No system-wide keyboard hooks. No background service. The binary runs in milliseconds.
The typo never reaches the shell
CommandFixer hooks the Enter key through PSReadLine. When the buffer looks like a near-miss of a command it knows, it shows the corrected form and waits for a single keystroke before anything executes.
PS> git sattus CommandFixer: did you mean git status [Y/n] y On branch main nothing to commit, working tree clean PS> docker imagse CommandFixer: did you mean docker images [Y/n] y PS> ipconfg /all CommandFixer: did you mean ipconfig /all [Y/n] y
For people who live in the terminal and mistype
CommandFixer is a small quality-of-life tool for the Windows command line. It corrects the near-misses you already know are wrong the instant you see them, without changing how you work.
It is for you if
- You work daily in PowerShell 7 or Windows PowerShell 5 and fumble subcommands like
git sattusordocker imagse. - You want corrections to be suggested, not silent: it always asks before it runs the fix.
- You want a tool that is local and self-contained, with no account, no telemetry and no background process.
- You are comfortable installing a single binary that hooks your PowerShell profile and can be cleanly removed.
It is not for you if
- You are on macOS or Linux. CommandFixer targets Windows PowerShell profiles and PSReadLine.
- You want it to guess intent or invent commands. It only corrects close matches to a known command set.
- You want fully silent auto-execution. Corrections are confirmed by you, by design.
- You expect a GUI. This is a CLI hook that stays out of your way.
A built-in dictionary, not one you maintain
Earlier versions asked you to list every typo by hand. Version 2 ships a built-in database of popular CLI tools and their valid subcommands, plus the standard Windows command set, and fuzzy-matches against it. There is nothing to configure to get useful corrections.
Fuzzy matching
Your command is compared to known subcommands by string similarity. A near-miss within a configurable threshold becomes a suggestion; anything too far off is left untouched.
Always confirmed
A changed command is never run silently. PSReadLine shows the corrected form and executes only after you press Enter to accept it.
PS7 and PS5 together
One install hooks both PowerShell 7 (pwsh) and Windows PowerShell 5 (powershell.exe) profiles at once. Uninstall cleanly removes both.
Yours, on your machine
A single Go binary with no CGO and no service. Config and a JSONL corrections log live under your home directory. Nothing leaves your machine.
Popular CLI tools and the Windows command set
Subcommands are corrected for these tools out of the
box. Standalone Windows commands (dir, ipconfig,
tasklist and many more) are matched by command name, and known
PowerShell aliases are recognised exactly so they are never "corrected".
Build, install, restart
CommandFixer is a Go program with no external dependencies. Clone it, build the binary, and run the installer. It hooks your profile per-user with no administrator rights.
Build
Run .\build.ps1 -Test to run the tests and build, or go build -o commandfixer.exe . directly.
Install
.\install.ps1 copies the binary to %LOCALAPPDATA%\CommandFixer\, adds it to your user PATH, writes a starter config, and hooks both the PS7 and PS5 profiles.
Restart PowerShell
Open a fresh session so the profile hook loads. Now mistype a command and press Enter: the correction appears before it runs.
Uninstall any time
.\uninstall.ps1 removes the hook from both profiles, deletes the binary and its PATH entry, and keeps your config and log. Add -RemoveConfig to remove those too.
# Clone, test and build git clone https://github.com/oernster/commandfixer cd commandfixer .\build.ps1 -Test # Install the hook for PowerShell 7 and Windows PowerShell 5 .\install.ps1 # Check a correction by hand (no hook needed) commandfixer correct "git sattus" # prints: git status # See how many corrections it has made commandfixer stats