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.

PyPI Python License Stars

If this saves you a hunt through someone's agent framework later, the ⭐ at the top of the page takes one click.

Hazzel demo

The 30-second pitch

Every coding agent claims to be transparent. Most of them are 50k-line frameworks with a plugin system, a cloud dashboard, and a subscription.

Hazzel is ~10k lines of Python in a flat src/hazzel/ layout you can trace end to end — agent/core.py is the whole loop, tools/ is every action it can take, and safety.py is the entire undo system.

It does the things a coding agent is supposed to do — read your repo, edit files, run commands, work with git — and stops before every one of them to show you exactly what's about to happen.

pip install hazzel
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

/model, pick a provider, paste a key — that's the whole setup.

Or export:

OPENAI_API_KEY
ANTHROPIC_API_KEY
GROQ_API_KEY
MISTRAL_API_KEY
GEMINI_API_KEY
DEEPSEEK_API_KEY
OPENROUTER_API_KEY

and skip the prompt entirely.

Running local models through Ollama needs no key at all.

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. File edits render as a unified diff before anything lands. Shell commands ask before they run — except a small allowlisted set of true read-onlys (ls, cat, git status), which skip the queue so exploration doesn't feel like a permission dialog.

  • Every write is checkpointed, automatically. Before Hazzel touches a file, it snapshots the prior bytes to ~/.config/hazzel/undo/ — up to 200 events, 20 per file. /undo restores bytes that were saved before the edit happened.

  • Commands are sandboxed to your project root. Destructive git commands such as reset --hard and clean are blocked outright. Raw git commit is steered into the /commit tool with its own diff preview and approval step. Push and pull run through the normal command-approval flow.

You can verify all three claims yourself in about 200 lines:

src/hazzel/safety.py
src/hazzel/tools/run_command.py

What it actually does

Understands your repo

Reads, searches, and lists your codebase. @path tags a file into context; /init walks the tree and drafts an AGENTS.md map so every future session starts oriented.

Ships real changes

Diff-preview-and-approve editing, /undo backed by real checkpoints, shell commands with timeouts, !command for a direct shell escape (!cmd & runs it in the background — /jobs polls and kills), fetch <url> to pull docs into context, and image attachment (@screenshot.png) for vision-capable models.

Speaks fluent git

/status, /diff --staged, /review [--staged] (read-only review of what you're about to commit), /commit with an auto-drafted Conventional Commit message and diff preview, /log — reads run instantly with zero LLM round-trip.

Push and pull go through the standard approval flow.

Extends through open standards, not lock-in

A minimal MCP stdio client using only the standard library talks to any MCP server through .hazzel/mcp.json.

SKILL.md files load project- or user-level skills on demand.

Neither requires Hazzel-specific tooling to author.

Shows you the bill

Provider-reported tokens are parsed into real dollar figures and logged locally — not estimated.

/usage today
/usage week
/usage month
/usage --by-model
/budget

A live tokens · $ line is shown every turn.

Stays out of your way between sessions

Per-project sessions persist across restarts with /session restore.

Plan mode (/plan on) explores read-only and proposes a numbered plan before touching anything.

Think mode (/think on) turns on extended reasoning for hard edits when you're willing to pay the token cost.

Works in a pipeline, not just a REPL

hazzel -p "prompt"

Runs one turn and exits.

Pipe a diff in, get a summary out. Use --output-format json for scripts and real exit codes (0, 1, 2, 130) for CI.

Providers — bring your own key, no subscription

Provider Notes
Groq Default (openai/gpt-oss-120b)
OpenAI
Anthropic
Mistral
Gemini
DeepSeek
OpenRouter 100+ models through one key
Ollama Fully local, no key needed

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.

Use @ to attach a file.

/docs

prints the full guide without leaving the terminal.

What it's honest about not being

v1.5.0, early-stage.

No autonomous PRs, no cloud dashboard, and no session synchronization 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.

If you find it useful, you can support its development and help keep it maintained, improved, and dependency-light.

Sponsor Hazzel on PayPal

Every contribution helps fund continued development and maintenance.

Contributing

Issues and pull requests are genuinely welcome.

ROADMAP.md tracks feature gaps against other terminal agents, and AGENTS.md — regenerate it with /init — contains the project rules:

  • No new dependencies without asking.
  • No public API changes without a CHANGELOG entry.
  • Keep the implementation small and inspectable.

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.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 hazzel 1.5.0
File Size Uploaded
hazzel-1.5.0.tar.gz 149.2 kB Details

Built distribution (wheel)

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

Total release size: 289.1 kB

Release files / hazzel-1.5.0.tar.gz

Download URL hazzel-1.5.0.tar.gz
Size 149.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fef03a270d7c9efe528ea25ba175cded4812eeb174af49a4f081221881b5d787
BLAKE2b-256 checksum
How to use checksums
01e825a2de2de96e56306012c54aaed7931c1a7fa678761546ec7764ec43b96f
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.0-py3-none-any.whl

Download URL hazzel-1.5.0-py3-none-any.whl
Size 139.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
801d9be01d0363e833d0874780c37efa4e64a2f6e84d613e95f62c3cf9b95097
BLAKE2b-256 checksum
How to use checksums
e97d63b369f4c589665491812443c49d2f259fc9decc5dfacc4607dfe2f943a4
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

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

This release

1.5.0 This release

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