A CLI tool that corrects failed commands using a fine-tuned Gemma 3 270M model. Type a wrong command, then type shit to fix it.
$ git psuh origin main
git: 'psuh' is not a git command. Did you mean 'push'?
$ shit
git push origin main [Enter/^C]
- Shell hooks record the last failed command and its exit code
- When you run
shit, it re-runs the command to capture stderr - A small local model suggests a fix as a structured edit operation
- You confirm and execute, or cancel
# Stable release
cargo install shit
# Development (latest main)
cargo install --git https://github.com/avafloww/shit
# Or build from source
git clone https://github.com/avafloww/shit
cd shit
cargo build --release
cp target/release/shit ~/.local/bin/The model (~253MB) is automatically downloaded from GitHub Releases on first run and cached in:
- Linux:
~/.local/share/shit/ - macOS:
~/Library/Application Support/shit/ - Windows:
%LOCALAPPDATA%\shit\
Add to your shell config:
# Fish (~/.config/fish/config.fish)
eval "$(shit init fish)"
# Bash (~/.bashrc)
eval "$(shit init bash)"
# Zsh (~/.zshrc)
eval "$(shit init zsh)"# Show suggested fix, Enter to execute, Ctrl+C to cancel
shit
# Auto-execute without confirmation
shit --yes
shit -y
shit --hardMIT — see LICENSE for details.