| Crates.io | fixit-cli |
| lib.rs | fixit-cli |
| version | 0.11.0 |
| created_at | 2024-07-03 00:16:35.748944+00 |
| updated_at | 2025-10-14 15:04:26.650437+00 |
| description | A utility to fix mistakes in your commands. |
| homepage | https://github.com/eugene-babichenko/fixit |
| repository | https://github.com/eugene-babichenko/fixit |
| max_upload_size | |
| id | 1290040 |
| size | 192,733 |
fixitfixit is a terminal application that fixes mistakes in your commands. It is
inspired by The Fuck. It is also designed to be fast as fuck (more
about that in the motivation section).
See contributing guidelines here. If you want to help fixit
move forward, see the roadmap.
When you run the fix command, it takes the last command from your shell
history and retrieves its output by either:
Then fixit runs the command and its output through a set of rules to suggest fixes. Then you select a fix and it is automatically run and added to your shell history.
echo "deb [arch=$(dpkg --print-architecture) trusted=yes] https://eugene-babichenko.github.io/fixit/ppa ./" | sudo tee /etc/apt/sources.list.d/fixit.list > /dev/null
sudo apt update
sudo apt install fixit
yay -S fixit-bin
Or build from source:
yay -S fixit
Create a new file with the following contents at /etc/yum.repos.d/fixit.repo
[fixit]
name=fixit GitHub repository
baseurl=https://eugene-babichenko.github.io/fixit/rpm
enabled=1
gpgcheck=0
Run dnf install fixit.
brew install eugene-babichenko/fixit/fixit
cargo install fixit-cli
You can also download pre-built binaries for Linux (static binaries) and macOS from Releases.
Add the corresponding command to your shell configuration file.
bash:
eval "$(fixit init bash)"
zsh:
eval "$(fixit init zsh)"
fish:
fixit init fish | source
Powershell:
Invoke-Expression (fixit init powershell | Out-String)
Having a command that broke? Just type fix in your shell.
You can change the name of the generated alias by providing the --name
argument to the init command:
fixit init --name f fish | source
This will generate the alias named f instead of fix.
Environment variables:
| Variable | Description | Default Value |
|---|---|---|
FIXIT_PAGE_SIZE |
Controls how many suggestions per page you will see on the screen | 5 |
FIXIT_QUICK_ENABLE |
Enable quick fixes using terminal emulator/multiplexer API | true |
FIXIT_QUICK_SEARCH_DEPTH |
Sets the number of lines to get from the scrollback buffer in addition to what we see on the screen | 1000 |
This configuration is applied immediately, meaning you do not need to re-initialize.
Logging is implemented via env_logger. Please refer to its
documentation to see how to configure the logs.
Terminal multiplexers:
Teminal emulators:
kitty usersYou don't need to do this, if you use a terminal multiplexer inside kitty.
This is optional, but without this fixit will fall back to just re-running the
command, which is going to be slower.
To make quick completions work, you need to enable remote
control. This is recommended, because this application uses
kitty @ get-text to retrieve the command output. For the best performance and
stability you are advised to set up shell integration.
brew_update_upgrade - replace brew update with brew upgrade when trying
to update a Homebrew package.cargo_clippy_args: a rule for cargo clippy arguments that must be
separated by --.cargo_install_cwd - fix cargo install without arguments (it requires
--path).cargo_wrong_command - fix misspelled cargo commands.command_not_found - search for misspelled command through $PATH.cp_cwd - cp came with only one argument, maybe you want to copy to the
current dir?cp_dir - add -R to cp when you are attempting to copy a directory.git_add_all_lowercase - correct git add -a to git add -A.git_branch_exists - fix git checkout -b when trying to checkout an
existing branch.git_commit_no_changes - suggest using git commit -a.git_no_upstream - set upstream branch when pushing.git_retag - suggest deleting a git tag and tagging a new commit with it, if
the tag already exists.git_wrong_command - fix misspelled git commands.mkdir_missing_parent - suggest using mkdir -p to create missing in-between
directories.rm_dir - add -r to rm when trying to remove a directory.sudo - prepend with sudo when permission to execute a command was denied.taskfile_no_task - suggest task names when trying to run a task from
Taskfile.uv_unexpected_argument - fix typos in arguments for the uv Python package
manager.