Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

fuu

fuu grabs the last command from your shell history and passes it to a configurable command (defaults to claude).

Install

go install github.com/rumpl/fuu@latest

Or build from source:

git clone https://github.com/rumpl/fuu.git
cd fuu
go build -o fuu .

Usage

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).

Configuration

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.

Examples

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:"]
}

Supported shells

  • zsh — reads ~/.zsh_history (handles the : timestamp:0;command format)
  • bash — reads ~/.bash_history
  • fish — reads ~/.local/share/fish/fish_history

The $HISTFILE environment variable is respected if set, regardless of shell.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages