Skip to main content

Hazzel

Hazzel

A terminal coding agent you can actually read.
Bring your own key. No subscription. Every change shown as a diff before it touches disk.

CI PyPI Downloads License Stars

Hazzel demo

Recently shipped: confirmation prompts accept yes — first external contribution (@Gambit-Checkmate, 1.5.1) · /review (1.5.0) · background !cmd & jobs (1.4.9) · git /commit with auto-drafted messages (1.4.8) · stdlib-only MCP client (1.4.7) — full changelog

Try it in your project

Every agent claims transparency. Hazzel is ~10k lines of Python you can trace end to end — agent/core.py is the whole loop, tools/ is every action it can take, safety.py is the entire undo system — and it stops before every write to show you what's about to happen.

pip install hazzel
export GROQ_API_KEY="..."   # or skip this and pick a provider inside with /model
cd your-project
hazzel
❯ Fix the failing test in tests/test_agent.py

  ● read_file   tests/test_agent.py
  ● edit_file   src/hazzel/agent/core.py
  ● run_command pytest -q — passed

Things you can say on day one

❯ /review --staged
❯ /commit
❯ what does agent/fastpath.py do — is it just caching?
❯ @screenshot.png make the nav match this

No project quiz, no config ceremony — the read-only commands answer instantly, and anything that touches disk stops at a diff first.

Why it's built this way

Most agents ask you to trust a black box. Hazzel asks you to trust three specific, inspectable mechanisms instead:

  • Every write is a diff you approve, first. Shell commands too — except a small allowlist of true read-onlys (ls, cat, git status) that skip the queue.
  • Every write is checkpointed, automatically. Prior bytes snapshotted to ~/.config/hazzel/undo/ (200 events, 20 per file) before anything lands. /undo restores them.
  • Commands are sandboxed to your project root. git reset --hard and clean are blocked outright; raw git commit is steered into /commit with its own diff preview.

You can verify all three claims in about 200 lines: src/hazzel/safety.py, src/hazzel/tools/run_command.py.

flowchart LR
    you["you — prompt, @file, slash command"] --> repl["__main__.py"]
    repl --> loop["agent/core.py — the whole loop"]
    loop --> fast["agent/fastpath.py — zero-LLM answers for reads"]
    loop --> dispatch["agent/dispatch.py"]
    dispatch --> gate["safety.py — approve · sandbox · checkpoint"]
    gate --> tools["tools/ — 13 actions"]
    loop --> llm["providers/ — 8 backends, your key"]
    loop --> term["ui.py + formatter.py — your terminal"]

How it compares

Where Hazzel stands out, measured against the tools people actually compare it to:

Capability Hazzel Aider Cloud agents
Price model free · BYOK free · BYOK subscription
Local models Ollama, keyless, zero config supported, needs env setup no
Readable end to end ~10k lines tens of thousands closed source
/undo without git byte-level snapshots git-commit based varies
MCP client stdio, zero new deps — varies

Aider is excellent — this is about fit, not superiority.

What it actually does

What In practice
Understands your repo Reads, searches, lists. @path pins a file into context; /init drafts an AGENTS.md map so every session starts oriented.
Ships real changes Diff-preview editing, /undo checkpoints, shell with timeouts, !cmd & background jobs via /jobs, fetch <url> for docs, @image.png for vision-capable models.
Speaks fluent git /status · /diff --staged · /review · /commit (auto-drafted Conventional message) · /log — reads run instantly, zero LLM round-trip.
Extends without lock-in Minimal MCP stdio client — standard library only, any server via .hazzel/mcp.json. SKILL.md skills load on demand. Neither needs Hazzel-specific tooling to author.
Shows you the bill Provider-reported tokens parsed into real dollars, logged locally — not estimated. Live tokens · $ line every turn; /usage today|week|month --by-model, /budget.
Remembers between sessions Per-project sessions persist with /session restore. /plan on explores read-only first; /think on buys extended reasoning for hard edits.
Works in a pipeline hazzel -p "prompt" runs one turn and exits — pipe a diff in, get a summary out. --output-format json + real exit codes for CI.

Providers — bring your own key, no subscription

Eight providers: OpenAI, Anthropic, Mistral, Gemini, DeepSeek, OpenRouter (100+ models, one key), Groq (default: openai/gpt-oss-120b) — set one env var (OPENAI_API_KEY, GROQ_API_KEY, …) and skip the prompt entirely.

Ollama runs fully local and needs no key at all. Switch anytime with /model. Nothing is metered by Hazzel — you pay your provider directly, or nothing at all if you're running local.

Commands at a glance

Group Commands
Modes /model · /plan on|off · /think on|off · /goal [@objective]
Git /status · /diff [--staged] · /review [--staged] · /commit · /log
Cost /usage [today|week|month|--by-model] · /budget
Extend /mcp [server [tool]] · /skills [name] · /init
Transcript /export · /copy · /retry · /jobs · /undo [n] · /session restore · /clear

Type / to filter live, @ to attach a file, /docs for the full guide without leaving the terminal.

What it's honest about not being

v1.5.3, early-stage. No autonomous PRs, no cloud dashboard, no session sync across machines. It doesn't replace your editor — it sits in the terminal next to it, and it stays small on purpose.

If you need a heavier, more automated agent, better options exist. If you want to see exactly what's about to happen to your files before it happens, this is built for that.

Support Hazzel

Hazzel is free and open-source, and it plans to stay both. The cheapest support costs nothing: use it, report what breaks, or send a PR.

If you'd rather throw money at the problem, that works too — it goes straight into maintainer time for docs, fixes, and reviews:

Donate via PayPal

Who's behind this

mukundzha
Mukund Jha
creator
ronaldsterners
ronaldsterners
Gambit-Checkmate
Gambit-Checkmate

Every PR lands through the same door: reviewed, CI-verified on four Python versions, credited in the release notes. ronaldsterners and Gambit-Checkmate started with a good first issue — the next row is one PR away.

Contributing

Issues and PRs genuinely welcome — ROADMAP.md tracks what's next, CONTRIBUTING.md has the ground rules (small, inspectable, no new deps without asking), and good first issues are labeled as such.

License

AGPL-3.0-or-later. See LICENSE.


Small tools stay small because people who find them useful say so.
If Hazzel is now sitting in your terminal next to your editor, a star is how the next person finds it too.

Release files for hazzel 1.5.3

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

Source distribution (sdist)

Source distribution for hazzel 1.5.3
File Size Uploaded
hazzel-1.5.3.tar.gz 149.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hazzel 1.5.3
File Interpreter ABI Platform
hazzel-1.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 289.1 kB

Release files / hazzel-1.5.3.tar.gz

Download URL hazzel-1.5.3.tar.gz
Size 149.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dc5f6d3af775fc637b9aba2770329273ec9135f0375f039d03f3dd7d08edad3b
BLAKE2b-256 checksum
How to use checksums
9dcd23c84ca4e4b5a30f0850492c736c01770b7cf4f8fbf942989853d6edc9d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release files / hazzel-1.5.3-py3-none-any.whl

Download URL hazzel-1.5.3-py3-none-any.whl
Size 140.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3627ab9a2401c13e05b9c2cb45cccf2eb6c08c97ab2ea5df7e9374c46f043256
BLAKE2b-256 checksum
How to use checksums
ff0722138c9ba5344e5ed4128ed408de4293d76c6399ccd52a9de07d9926e440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.9

Release history Release notifications | RSS feed

1.6.0

2 release files

1.5.7

2 release files

1.5.4

2 release files

This release

1.5.3 This release

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.9

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.6

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

0.4.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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