Skip to main content

Fix your last failed shell command with an LLM. Type `oops`.

Project description

oops

Type oops after a command fails. It figures out the fix and runs it.

LLM-powered command-line repair. Zero dependencies. Works with a local model — no API key, fully offline.

oops demo

$ git statsu
git: 'statsu' is not a git command. See 'git --help'.

$ oops
🤖 thinking...

  git status

Run this? [Y/n] y
On branch main
nothing to commit, working tree clean

You mistyped a command, it failed, you sigh — and instead of squinting at the error you just type oops.

Install

pip install oops-cli
oops --install      # adds a tiny shell hook to your .bashrc / .zshrc
source ~/.bashrc    # or just open a new terminal

That's it. After any failed command, type oops.

Pick a brain

oops auto-detects a provider:

Provider Setup Notes
Anthropic export ANTHROPIC_API_KEY=... Fast, smart, default if the key is set
Local (Ollama) install Ollama, ollama pull llama3.2 No key, fully offline, free

If ANTHROPIC_API_KEY is set it uses that; otherwise it falls back to a local Ollama model.

How it works

  1. The shell hook hands oops the command you just ran.
  2. oops re-runs it to capture the exact error output.
  3. It asks the model for a corrected command.
  4. It shows you the fix and runs it only if you say yes.

Nothing executes without your confirmation.

Config

Env var Default What
ANTHROPIC_API_KEY Use the Anthropic API
OOPS_MODEL claude-haiku-4-5-... Anthropic model
OOPS_OLLAMA_MODEL llama3.2 Local model name
OOPS_OLLAMA_URL http://localhost:11434 Ollama endpoint

Why

The error message almost always contains the answer. oops just reads it for you so you don't have to context-switch. It's the difference between a 200ms oops and a 30-second detour to your browser.

Contributing

Issues and PRs welcome. Good first ones: more providers (OpenAI, Gemini, Groq), a --yes auto-run flag, multi-suggestion mode, and a --explain mode that explains instead of fixing.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oops_cli-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

oops_cli-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file oops_cli-0.1.0.tar.gz.

File metadata

  • Download URL: oops_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oops_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 11ead9a86b397110e75c861712ee4501441319fad9a6bd3a39ca90da48784bd3
MD5 d9539c188e741da03bbe9f23d6df7b84
BLAKE2b-256 1aa02e521a8581a1567ff6cb4454436258be0d1c176818315c0442423546938a

See more details on using hashes here.

File details

Details for the file oops_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: oops_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for oops_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a30f3f85047d5db98aca2ee6c3d8bff551c76e4dada3d3e0b11fc515c0ec09d7
MD5 d27188a76d68ce10ebf339f5803884d2
BLAKE2b-256 45789702aae9e2ca8dcf025f848082deaa57b7916c2a125fcbb3a8101ca4aa15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page