Run a command. If it fails, send the output to pi for help.
$ pif brew install --cask claudebar
==> Downloading https://github.com/tddworks/ClaudeBar/releases/download/v0.4.32/ClaudeBar-0.4.32.dmg
Error: SHA-256 mismatch
✗ Exit code: 1
Send to pi? [Y/n]
# With uv (recommended)
uv tool install pif-cli
# Or curl
curl -fsSL https://raw.githubusercontent.com/sasha-computer/pif/main/install.sh | bashRequires pi to be installed and on your PATH.
# Run a command — if it fails, send to pi
pif brew install --cask claudebar
pif make build
pif npm install
# Custom message
pif -m "why does this SHA keep mismatching" brew install --cask claudebar
# Skip confirmation
pif -y make buildShell integration adds a bare pif command that re-runs your last failed command and sends it to pi. No need to retype it.
# Copy the function
cp shell/pif.fish ~/.config/fish/functions/pif.fish
# Or with curl
curl -fsSL https://raw.githubusercontent.com/sasha-computer/pif/main/shell/pif.fish -o ~/.config/fish/functions/pif.fishThen just:
$ brew install --cask claudebar # fails
$ pif # re-runs, captures, sends to pi
# Add to ~/.bashrc or ~/.zshrc
eval "$(curl -fsSL https://raw.githubusercontent.com/sasha-computer/pif/main/shell/pif.bash)"- Runs your command, streaming output to the terminal and capturing it
- If the command fails (non-zero exit), asks if you want to send to pi
- Writes the command + output to a temp file
- Launches
pi @tempfile "This command failed. Help me fix it." - Pi opens an interactive session with your error as context
- Temp file is cleaned up after pi exits
MIT
