Hazzel: the open source terminal coding agent

A tiny AI coding assistant that lives in your terminal — approval-first, bring your own key.

hazzel v1.5.7 · free · AGPL-3.0 · macOS, Linux, Windows · ★ star if useful

Hazzel is a terminal coding agent and CLI harness: it reads code, edits files, runs commands, reviews diffs and reads the web — always with your approval first. Every step is visible, every mutation goes through you.

It is open source (~10k lines of Python you can trace end to end), model-agnostic (Groq, OpenAI, Anthropic, Mistral, Gemini, DeepSeek, OpenRouter, local Ollama), and free — no subscription. You pay your provider directly, or nothing at all on local models.

Hazzel demo: ask it to fix the failing test in test.py — read, approve the edit with y, tests pass
Watch Hazzel fix the bug in test.py: read, diff approved with y, tests green.

Install the terminal coding agent

$ pip install hazzel

Requires Python 3.10 or newer. Then:

export GROQ_API_KEY="..."   # or skip this and pick a provider inside with /model
cd your-project
hazzel

The whole loop is agent/core.py, every action is in tools/, the undo system is safety.py — and Hazzel stops before every write to show you what is about to happen.

Hazzel 1.5.7 · ~/hazzel

❯ Fix the failing test in tests/test_agent.py

read_file · edit_file (diff approved) · run_command pytest -q — passed

openai/gpt-oss-120b · 1.2k tokens · $0.004 session · build · @ tag file

Why Hazzel

Hazzel vs alternatives

Looking for an Aider alternative or a Claude Code alternative you can run in any terminal with your own key? How the options compare:

Open source terminal AI coding assistants compared
ToolOpen sourceBring your own keyApproval-first diffsBuilt-in undoLocal models
HazzelYes (AGPL-3.0)Yes — 8 providersYes, every writeYes (/undo)Yes (Ollama)
AiderYes (Apache-2.0)YesYesGit-basedYes
Cloud agentsMostly noSubscriptionVariesVariesNo

Hazzel's bet: most agents ask you to trust a black box. Hazzel asks you to trust three specific, inspectable mechanisms instead — approved diffs, automatic checkpoints, project-root sandboxing.

Commands

Modes

Cost

Git

Transcript

Project

Type @path to attach a file, !command to run shell directly (& suffix runs it in the background — /jobs polls and kills).

hazzel -p "prompt" answers once and exits — pipe stdin in, -y allows writes, --output-format json for scripts.

changelog · PyPI · GitHub source

Frequently asked questions

Is Hazzel free?
Yes. Hazzel is free and open source (AGPL-3.0). You pay your model provider directly for API usage — or nothing at all with local Ollama models. No subscription, nothing metered by Hazzel.
Which AI models does Hazzel support?
Groq, OpenAI, Anthropic, Mistral, Gemini, DeepSeek, OpenRouter and local Ollama — one API key each, switched any time with /model.
Does Hazzel change my files without asking?
No. Every file edit shows a diff before it applies, shell commands ask first, and every write is checkpointed so /undo always restores prior bytes. Commands are sandboxed to your project root.
What do I need to install Hazzel?
Python 3.10+ on macOS, Linux or Windows. pip install hazzel, run hazzel, add a key with /model.
How is Hazzel different from Aider or Claude Code?
Hazzel is ~10k lines of Python you can trace end to end, bring-your-own-key with no subscription, and approval-first on every mutation with automatic undo. See the comparison table.