fuu grabs the last command from your shell history and passes it to a configurable command (defaults to claude).
go install github.com/rumpl/fuu@latestOr build from source:
git clone https://github.com/rumpl/fuu.git
cd fuu
go build -o fuu .Run a command, then run fuu:
$ docker build -t myapp .
# ... some error happens ...
$ fuu
Running: claude docker build -t myapp .fuu will read your shell history, grab the command before fuu itself, and pass it to claude (or whatever you've configured).
On first run, fuu creates a config file at $XDG_CONFIG_HOME/fuu/config.json (defaults to ~/.config/fuu/config.json):
{
"command": "claude",
"args": []
}| Field | Description | Default |
|---|---|---|
command |
The binary to run | claude |
args |
Arguments to pass before the history command is appended | [] |
The last history command is always appended as the final argument.
Ask Claude to explain the last command:
{
"command": "claude",
"args": ["-p", "explain this command:"]
}Use a different tool entirely:
{
"command": "chatgpt",
"args": ["--prompt", "what went wrong with:"]
}- zsh — reads
~/.zsh_history(handles the: timestamp:0;commandformat) - bash — reads
~/.bash_history - fish — reads
~/.local/share/fish/fish_history
The $HISTFILE environment variable is respected if set, regardless of shell.
MIT