Skip to main content

An AI agent that fixes your broken CLI commands automatically using a local LLM

Project description

YOLO Logo

YOLO — You Only Launch Once

An AI agent that fixes your broken CLI commands. Automatically. While you watch.

License: MIT Python 3.10+ Ollama PRs Welcome 100% Local

[!CAUTION] Disclaimer: YOCO is experimental and can modify/delete files. Use it in isolated environments like Docker. See DISCLAIMER.md for full details.


The pitch

You run a command. It breaks. You stare at the error. You Google it. You copy-paste from Stack Overflow. It breaks again. You question your life choices.

Or: you run YOLO. It sees the error. It fixes it. It retries. You get coffee.

$ yoco python3 myapp.py

That's it. That's the whole interface.


Demo

Brain 1 — Interceptor: missing package fixed in under a second

YOCO fixes a missing package instantly

Brain 3 — Local LLM: patches a logic bug in your code

YOCO uses local LLM to fix a ZeroDivisionError

Brain 2 — Fix Memory: same error, instant replay

YOCO recalls a past fix and applies it instantly

Rollback: undo everything YOCO changed

YOCO interactive rollback picker

Dry Run: preview the fix before applying it

YOCO dry run mode

Security Gate: blocks git push when an API key is exposed

YOCO blocks git push due to exposed OpenAI API key

Watch Mode: auto-fixes on every file save

YOCO watch mode fixes two bugs automatically as files change


What actually happens under the hood

YOLO has three brains, tried in order from fastest to slowest:

Error hits
    │
    ▼
┌─────────────────────────────────────────────────┐
│  Brain 1: Interceptors                          │  ← 23 regex rules
│  "ModuleNotFoundError: No module named 'flask'" │    fires in <1ms
│  → pip install flask                            │    no LLM involved
└─────────────────────────────────────────────────┘
    │ no match
    ▼
┌─────────────────────────────────────────────────┐
│  Brain 2: Fix Memory                            │  ← remembers past fixes
│  "seen this IndexError before (3x)"             │    fires in <5ms
│  → replay the fix that worked last time         │    no LLM involved
└─────────────────────────────────────────────────┘
    │ cache miss
    ▼
┌─────────────────────────────────────────────────┐
│  Brain 3: Local LLM                             │  ← fine-tuned Qwen2.5-Coder
│  reads your error + your code                   │    runs 100% locally
│  → generates a targeted fix command             │    ~1-3 seconds on Apple Silicon
└─────────────────────────────────────────────────┘

Fix works → snapshot it, remember it, move on. Fix fails → roll back every file to its pre-YOLO state, try again.


Install

1. Clone and install YOCO

git clone https://github.com/erdemozkan/YOLO-CODER
cd YOLO-CODER
pip install -e .

2. Install Ollama

Download from ollama.com or:

brew install ollama
ollama serve   # start the server (runs on http://localhost:11434)

3. Set up the AI model

Option A — Pull directly from Hugging Face (easiest):

# 1.5B model — fast, ~941MB, runs on any machine
ollama run hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder

# 7B model — smarter, ~4.4GB, needs ~6GB RAM
ollama run hf.co/erdemozkan/YOLO-7B-Qwen-Coder

Option B — Download GGUF manually and register:

# Download the Q4 GGUF from HuggingFace
# → https://huggingface.co/erdemozkan/YOLO-7B-Qwen-Coder/blob/main/YOLO-7B-Qwen-q4.gguf

# Create a Modelfile
cat > Modelfile <<'EOF'
FROM ./YOLO-7B-Qwen-q4.gguf

TEMPLATE """{{ if .System }}<|im_start|>system
{{ .System }}<|im_end|>
{{ end }}<|im_start|>user
{{ .Prompt }}<|im_end|>
<|im_start|>assistant
"""

PARAMETER stop "<|im_start|>"
PARAMETER stop "<|im_end|>"
PARAMETER temperature 0.1
PARAMETER top_p 0.1
SYSTEM """You are a CLI repair tool. Output ONLY a single bare bash command to fix the error. No explanation. No markdown. No backticks."""
EOF

# Register with Ollama
ollama create yolo-7b -f Modelfile

# Verify it works
ollama run yolo-7b "ModuleNotFoundError: No module named 'requests'"
# → pip install requests

4. Configure YOCO to use your model

mkdir -p ~/.yolo
# Use 1.5B (default, fast):
echo '{"model": "hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder"}' > ~/.yolo/config.json

# Or use 7B (if registered manually as above):
echo '{"model": "yolo-7b"}' > ~/.yolo/config.json

5. Run it

yoco python3 myapp.py

Usage

# Basic: fix whatever breaks
yoco python3 myapp.py
yoco npm run dev
yoco cargo build
yoco docker-compose up

# See what it would do without doing it
yoco --dry-run python3 myapp.py

# Get a full AI explanation of what went wrong and why
yoco --explain python3 myapp.py

# Watch mode: re-run on every file save
yoco --watch python3 myapp.py

# Undo everything YOLO changed in the last session
yoco --rollback

# Undo a specific file
yoco --rollback src/main.py

# Browse history of past runs
yoco --history

# Use the bigger 7B model for hard errors
yoco --model yolo-7b python3 myapp.py

What it can fix right now

Category Examples
Python ModuleNotFoundError, SyntaxError, PermissionError, FileNotFoundError, IndexError, ZeroDivisionError, AttributeError, KeyError, TypeError
pip DEPRECATION, --break-system-packages, missing packages, hash mismatches
Node.js Cannot find module, MODULE_NOT_FOUND
npm ENOENT, ERESOLVE (peer deps), EACCES (permissions)
TypeScript TS2304 (cannot find name), TS2339 (property does not exist)
Docker Image not found, port already in use, container name collision, daemon not running
Git Merge conflicts, detached HEAD, push rejected, nothing to commit, not a repo
Everything else LLM fallback covers what the rules don't

The model

YOLO ships with fine-tuned Qwen2.5-Coder models trained specifically on CLI error/fix pairs. It's trained to output exactly one bare shell command — no markdown, no explanation, no backticks. Just the fix.

Our fine-tuned models are live on Hugging Face!

1. Using with Ollama

You can pull and run the models directly via Ollama:

# For fast fixes, common errors, and low RAM usage:
ollama run hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder

# For complex errors and better reasoning:
ollama run hf.co/erdemozkan/YOLO-7B-Qwen-Coder

2. Using with LM Studio or llama.cpp

  1. Browse to my Hugging Face profile: erdemozkan.
  2. Open the model repository (YOLO-1.5B-Qwen-Coder or YOLO-7B-Qwen-Coder).
  3. Download the .gguf file from the "Files" section.
  4. Load the file into LM Studio or run it with your llama.cpp server.
Model Size Best for
YOLO-1.5B-Qwen-Coder 1.5B Fast fixes, common errors, low RAM
YOLO-7B-Qwen-Coder 7B Complex errors, better reasoning
qwen2.5-coder:7b 7B Vanilla base model

Training data: 2,250 error/fix pairs covering Python, Node, npm, TypeScript, Docker, Git, web frameworks, auth, async, CORS, circular imports, and more. Format: ChatML LoRA on Apple Silicon M-series.


Rollback & history

YOLO snapshots every file it touches before making any changes. If a fix fails after 3 attempts, everything is restored automatically.

# See what YOLO changed in the last session
yoco --rollback
# → numbered list of modified files, pick one or press 'a' to undo all

# See the last 20 runs
yoco --history
# → table: date / command / outcome / source (interceptor / memory / LLM)

# See details of run #5
yoco --history 5

Configuration

YOCO supports Ollama, LM Studio, and llama.cpp out of the box. Config is layered — CLI flags override the saved file, which overrides built-in defaults.

Config file

// ~/.yolo/config.json
{
  "provider": "ollama",
  "host": "localhost",
  "port": 11434,
  "model": "hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder",
  "max_attempts": 3,
  "dry_run": false
}

Per-run CLI overrides

# Switch provider for one run
yoco --provider lmstudio python3 myapp.py

# Custom host or port (e.g. Ollama on a remote machine or non-default port)
yoco --host 192.168.1.50 --port 11434 python3 myapp.py

# Override model for one run
yoco --model yolo-7b python3 myapp.py

Provider defaults

Provider Default port Notes
ollama 11434 ollama serve — recommended
lmstudio 1234 Enable "Local Server" in the LM Studio UI
llamacpp 8080 ./server -m model.gguf --port 8080

Setting up each provider

Ollama (recommended)

ollama serve                                        # start the server
ollama run hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder  # pull + verify model
echo '{"provider": "ollama", "model": "hf.co/erdemozkan/YOLO-1.5B-Qwen-Coder"}' > ~/.yolo/config.json

LM Studio

# 1. Open LM Studio → Model tab → load any GGUF model
# 2. Go to Local Server tab → Start Server (enable CORS)
# 3. Tell YOCO to use it:
echo '{"provider": "lmstudio"}' > ~/.yolo/config.json
# LM Studio uses whatever model is currently loaded — no model name needed

llama.cpp server

./server -m YOLO-7B-Qwen-q4.gguf --port 8080      # start the server
echo '{"provider": "llamacpp", "port": 8080}' > ~/.yolo/config.json

Custom port or remote host

# Ollama running on a non-default port
echo '{"provider": "ollama", "host": "localhost", "port": 12345}' > ~/.yolo/config.json

# Ollama on a remote machine on your local network
echo '{"provider": "ollama", "host": "192.168.1.50", "port": 11434}' > ~/.yolo/config.json

Check active config

yoco --config

Philosophy

Most AI coding tools want to be your pair programmer. YOLO wants to be the intern who quietly fixes the thing that was blocking you so you can keep doing what you were doing.

It runs locally. It doesn't read your whole codebase. It doesn't require an API key. It doesn't post your stack traces to anyone. It doesn't ask for confirmation for the obvious stuff. It just fixes it.

The design priorities, in order:

  1. Speed — interceptors fire before the LLM even wakes up
  2. Safety — nothing is applied without a snapshot; everything is reversible
  3. Locality — 100% local inference, no data leaves your machine
  4. Simplicity — one command, wraps whatever you were already running

Oh, and while it works, it'll throw out a random quip — "YOLOing..", "Crying..", "Day dreaming.." — just for fun 😄


Roadmap

See FUTURE_FEATURES.md for deferred ideas with architectural reasoning.

Completed:

  • --explain mode — plain-English diff after every fix
  • --watch mode — re-runs on every file save
  • --rollback — interactive undo picker
  • --dry-run — preview fix without applying
  • Fix memory — instant replay of past fixes
  • Security gate — blocks git push when secrets are detected
  • First-run disclaimer with local acceptance record

Near-term:

  • Rust / cargo error interceptors
  • Shell script error interceptors (bash -e failures)
  • VS Code extension (show fix inline before applying)
  • CI mode (non-interactive, exits 0 on fix, 1 on failure)
  • pip install yoco — publish to PyPI for global install
  • Lean terminal UI — interactive dashboard while YOCO works
  • YOCO Web — browser-based interface similar to Claude Code

Contributing

Interceptors are the easiest entry point. Add a function to core/interceptors.py, append it to the INTERCEPTORS list, add a test case to tests/tests.json. See CLAUDE.md for the full developer guide.


License

MIT. Do whatever you want with it. If you make a million dollars, consider buying the author a coffee.


Star it if it saved you from a Stack Overflow rabbit hole.

Built on Apple Silicon. Powered by local LLMs. Runs at YOLO speed.

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

yolo_coder-0.0.2.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

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

yolo_coder-0.0.2-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

Details for the file yolo_coder-0.0.2.tar.gz.

File metadata

  • Download URL: yolo_coder-0.0.2.tar.gz
  • Upload date:
  • Size: 53.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for yolo_coder-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cad6a09163bef5a6ec743962b35c52e1ee6022b3ce36f6e62a24cd1194747f00
MD5 b0eb41c586f65d2420c308966cb362fc
BLAKE2b-256 d74d586a28f61f8c41e228f71c67ecfa10797411424387df47ec66e42add41f5

See more details on using hashes here.

File details

Details for the file yolo_coder-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: yolo_coder-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 56.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for yolo_coder-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 88735f01b979770483a1bbc1b3d55335658838e2dfc89c723fae7345f246adc8
MD5 9ea1d60b85655dcd303b07dab49d1e73
BLAKE2b-256 e94bb563ee10a1b351d680e9bc5e8c56566559e37bdf87255e7c760207508225

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