A tiny Rust CLI that sends your terminal/git mistakes to an LLM and prints helpful advice.
It automatically includes your last 10 terminal commands for context.
sorry I messed upcargo install --path .To get the most accurate command history, add the shell function to your shell config:
For Bash (~/.bashrc or ~/.bash_profile):
# Set path to sorry binary (adjust if installed elsewhere)
export SORRY_BIN="$HOME/.cargo/bin/sorry"
# Source the shell function
source /path/to/sorry/shell/sorry.bashFor Zsh (~/.zshrc):
# Set path to sorry binary (adjust if installed elsewhere)
export SORRY_BIN="$HOME/.cargo/bin/sorry"
# Source the shell function
source /path/to/sorry/shell/sorry.zshThe shell function ensures history is captured from your current session. Without it, sorry will try to read from history files (which may not be up-to-date).
Optional: You can override the default count of 10 commands:
sorry 5 I need help # Uses last 5 commands instead of 10# OpenAI
sorry --config-openai
# Groq (free tier available!)
sorry --config-groqYou'll be prompted for your API key and model:
🔧 Configuring groq
Enter API key: gsk-xxxxx
Enter model name (openai/gpt-oss-20b):
✓ Configured groq with model 'openai/gpt-oss-20b'
sorry --behaviour🎭 Configure sorry's behaviour
Choose a mood:
1. Treat me like a princess
2. Treat me like a bro
3. Treat me like a bitch
Select mood [1-3]:
Moods:
- Princess 👸 - Gentle, supportive, encouraging
- Bro 🤙 - Casual, chill, brief
- Bitch 💅 - Roasts you mercilessly, but still helps
sorry I made a mistake
sorry what did I just do
sorry helpIt automatically includes your last 10 terminal commands for context. If you've set up the shell function (recommended), it reads from your current session's history. Otherwise, it falls back to reading from history files.
| Command | Description |
|---|---|
sorry <message> |
Get help (includes last 10 commands as context) |
sorry --config-openai |
Configure OpenAI |
sorry --config-groq |
Configure Groq |
sorry --behaviour |
Choose your mood |
sorry --show-config |
Show current settings |
src/
├── main.rs # CLI entry point
├── config.rs # Config types, moods, file I/O
├── cli.rs # Interactive configuration
├── api.rs # LLM API calls
└── history.rs # Shell history reading
MIT