Hazzel
A readable terminal coding agent: bring your own key, and approve every change as a diff before it hits disk.
- Source repo
- mukundzha/hazzel
- Stars
- ★ 29
- Last updated
- today
- License
- Apache-2.0
- Primary language
- Python
- FA score
- 63/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformOpenAI API · Claude API
- Cost
- Free software; you pay for model usage
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- Terminal-first developers who want the agent to edit code but want to inspect a diff before anything lands.
- Not a fit if
- Teams wanting fully autonomous PR creation
- Users needing a cloud dashboard or cross-machine session sync
- Developers who want a GUI IDE extension instead of a terminal
- Source review
- 63/100 · Some gaps
What does this agent do, and when should you use it?
Hazzel is a terminal coding agent written in Python, roughly 10k lines long, with the entire loop in agent/core.py, every action under tools/, and the undo system in safety.py. A REPL accepts prompts, @file references and slash commands; agent/fastpath.py answers read-only lookups without a model call, then agent/dispatch.py routes work to 16 tools. Every write and shell command passes through safety.py — diff preview and approval, project-root sandboxing, and automatic checkpoints of prior bytes in ~/.config/hazzel/undo/. It ships with eight provider backends (Groq, OpenAI, Anthropic, Mistral, Gemini, DeepSeek, OpenRouter, plus keyless local Ollama), so you pay your provider directly or nothing at all locally. It also includes a minimal stdlib-only MCP stdio client, on-demand SKILL.md skills, and a non-interactive hazzel -p mode with JSON output and exit codes for pipelines. The project is at v1.6.2 under Apache-2.0 and describes itself as early-stage.
After launch you get a terminal REPL: type a prompt, pin files with @path, or type / to filter commands live. The core loop reads and searches the repo (read_file, listings, glob patterns such as **/*.py), previews and applies edits (edit_file), runs shell commands with timeouts (run_command), and starts background jobs with !cmd &, managed through /jobs. Read-only requests are served locally by the fastpath without an LLM round trip. Before any write, it renders a diff and asks y/N; one decision per turn sticks. Shell commands outside a small read-only allowlist (ls, cat, git status) go through the same gate. Before each write, prior bytes are snapshotted into ~/.config/hazzel/undo/ (200 events, 20 per file); /undo reverts only the agent's hunks while keeping your later edits, and /redo reapplies. Git commands /status, /diff, /review, /commit (auto-drafted Conventional message) and /log execute locally. /usage and /budget turn provider-reported tokens into dollars, and /session save|list|restore persists per-project sessions. In pipeline mode, hazzel -p "prompt" --output-format json emits a success object with response, model and usage, or an error object carrying exit_code.
- Terminal-first developers who want the agent to edit code but want to inspect a diff before anything lands.
- Individual developers using their own Groq or OpenAI key without a subscription.
- Teams running local Ollama models in restricted environments for keyless read-and-edit work.
- CI pipelines that need a single-turn agent turn with parseable JSON and meaningful exit codes.
- Engineers who want /review --staged and /commit to draft a Conventional commit message before pushing.
- Users who want to roll back only the agent's changes while preserving their own later edits.
How do you install or deploy this agent?
Try it without installing anything (no venv touched):
uvx hazzelOr:
pipx run hazzelTo keep it:
pip install hazzelOr:
uv tool install hazzelpipx install hazzelThen set at least one provider key, for example:
export GROQ_API_KEY="..."You can skip the key entirely and pick a provider inside the session with /model; local Ollama needs no key and honors OLLAMA_HOST.
How do you use this agent?
Start it inside your project:
cd your-project
hazzelThen describe the task in plain language, for example:
❯ Fix the failing test in tests/test_agent.pyCommon commands:
❯ /review --staged
❯ /commit
❯ @screenshot.png make the nav match this
❯ /model
❯ /plan on
❯ /undoRun a single turn non-interactively:
hazzel -p "prompt" --output-format jsonPrint the built-in model catalog (no key, config or network needed):
hazzel --list-modelsOptional environment variables:
export HAZZEL_CODE_THEME=monokai
export HAZZEL_NO_UPDATE_CHECK=1What are this agent's strengths and limitations?
- Mandatory diff approval before every write, with a single decision per turn instead of repeated prompts.
- Snapshot-based /undo and /redo that do not rely on git and keep your own later edits intact.
- Eight provider backends plus keyless local Ollama, switchable with /model and no vendor lock-in.
- About 10k lines of Python with the loop, tools and safety each in one place (agent/core.py, tools/, safety.py), so behavior is auditable end to end.
- A stdlib-only MCP stdio client and SKILL.md skills, so extensions need no Hazzel-specific tooling.
- JSON output with documented exit codes (1 failed turn, 2 missing key, 130 cancellation) for CI use.
- Self-described as early-stage at v1.6.2, with no autonomous PRs, cloud dashboard or cross-machine sync.
- Requires your own provider API keys and per-call payment, or local Ollama compute.
- Terminal REPL is the only interface — no IDE extension or GUI.
- The comparison table against alternatives is the project's own framing and is not independently verified.
- Undo snapshots are capped (200 events, 20 per file) in ~/.config/hazzel/undo/, so deep history cannot be rolled back.
How does this agent compare with similar options?
The README explicitly compares Hazzel against Aider and unnamed "cloud agents" on price model, local models, end-to-end readability, the /undo mechanism and MCP client support, while stating that Aider is excellent and the comparison is about fit rather than superiority. The cloud agents are not named, so specific products cannot be identified.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Hazzel This agent | 63 · Some gaps | CLIFree + model costs | ★ 29 | today | Python | OpenAI API · Claude API |
| Qwen Code | 54 · Major gaps | CLIFree + model costs | ★ 29k | today | TypeScript | OpenAI API · Claude API |
| FuXi Terminal AI Coding Agent | 37 · Major gaps | CLIFreemium | ★ 3.2k | 6d ago | Python | OpenAI API · Claude API |
| Octomind | 70 · Some gaps | CLIFreemium | ★ 179 | today | Rust | OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
README and tests show diff-before-write confirmation, persistent /allow rules, plan-mode write blocking, and /undo snapshots, giving strong user_confirmation and rollback (3). Least privilege is only partial: the run_command sandbox and read-only allowlist are described in README but source is not provided, and /allow all=always can disable all confirmations at once, so least_privilege is 2. Data-flow transparency is asserted only in README with no source backing (2). Sensitive data handling rests on a SECURITY.md claim of 0600 permissions with no code verification (2). Dependency security lists five third-party SDKs with loose lower bounds and no lockfile or audit (1). External effects have sandbox and git-block claims but no source (2). Source attribution is only the LICENSE appendix and author name, no NOTICE or third-party attribution (1).
Tests cover approvals, plan mode, and fastpath pure logic, and CI runs pytest on four versions, so self-consistency is adequate (2). Dependency availability uses loose lower bounds with no lockfile, and the 453-tests claim is a badge assertion, so 1. Failure messages include structured JSON errors and exit codes, corroborated by tests (2).
README clearly targets terminal developers with BYOK, local Ollama, pipeline mode, and CI usage (2). A dedicated section states what it is not, so capability boundaries are 2. Trigger precision is tested via fastpath distinguishing read-only and dangerous commands (2). Environment fit covers Python 3.10-3.13 and multiple providers but CI is Linux-only (2).
README is well structured with multiple install paths, rich examples, and a known-limitations section (2). Naming stability has versioned commands and a changelog link (2). License is the full Apache-2.0 text (3). Versioning has a release workflow verifying tag matches source, but CHANGELOG content is not provided (2). Maintenance responsibility is a personal email and an unverified publisher (1).
Output usability includes diff preview, JSON output, and exit codes (2). Marginal value is readability and selective undo, but many comparable tools exist (2). Cost benefit is BYOK, local models, and token billing display (2).
README makes many performance and comparison claims (~10k lines, 453 tests, better than Aider) without verifiable evidence, so claim_traceability is 1. Cross-source corroboration is partial between tests and README (1). Fact and inference separation is weak, with marketing tone mixed with facts (1).
- Publisher identity is unverified by the FollowAgents registry; maintenance rests on a personal email, so long-term support is uncertain.
- Key safety and quality claims in README (sandbox, read-only allowlist, 453 passing tests) lack corresponding source or verifiable evidence and remain static assertions.
- Dependencies use loose lower bounds with no lockfile, leaving supply-chain risk unmitigated.
- /allow all=always can disable all confirmations at once; use with care.
- Only the latest release receives security fixes, and the project is early-stage.
FAQ
Do I need a paid subscription to use Hazzel?
Will the agent overwrite my source files directly?
Can I use it inside scripts or CI?
hazzel -p "prompt" --output-format json runs one turn and exits, emitting {success, response, model, usage} on success or a JSON object with error and exit_code on failure. Exit codes are 1 for a failed turn, 2 for a missing key and 130 for cancellation.Which models and local setups are supported?
hazzel --list-models to print the built-in catalog.