Skip to main content

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

Metadata

Release files for oops-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oops-cli 0.1.0
File Size Uploaded Provenance Actions
oops_cli-0.1.0.tar.gz 6.7 kB Without provenance Details for oops_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for oops-cli 0.1.0
File Interpreter ABI Platform Actions
oops_cli-0.1.0-py3-none-any.whl Python 3 none any Details for oops_cli-0.1.0-py3-none-any.whl

Total release size: 14.7 kB

Release files / oops_cli-0.1.0.tar.gz

Download URL oops_cli-0.1.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
11ead9a86b397110e75c861712ee4501441319fad9a6bd3a39ca90da48784bd3
BLAKE2b-256 checksum
How to use checksums
1aa02e521a8581a1567ff6cb4454436258be0d1c176818315c0442423546938a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / oops_cli-0.1.0-py3-none-any.whl

Download URL oops_cli-0.1.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a30f3f85047d5db98aca2ee6c3d8bff551c76e4dada3d3e0b11fc515c0ec09d7
BLAKE2b-256 checksum
How to use checksums
45789702aae9e2ca8dcf025f848082deaa57b7916c2a125fcbb3a8101ca4aa15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for oops-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page