{"slug": "show-hn-hazzel-a-tiny-minimal-git-native-coding-agent", "title": "Show HN: Hazzel – A tiny, minimal, Git-native coding agent", "summary": "Hazzel 0.1.2, a minimal Git-native coding agent that runs in the terminal, is now available via pip install hazzel. It offers ten tools for code inspection, editing, and Git operations, supports bring-your-own API keys from Groq, OpenAI, Mistral, or Anthropic, and requires Python 3.10+. The agent emphasizes transparency, with every read, edit, and command visible, and includes optional plan and prove modes.", "body_md": "**A small terminal coding agent that works on your code, not around it.**\n\nOnce upon a time, every coding assistant wanted to become your IDE, your cloud, your everything.\n\nHazzel chose a different story.\n\nIt stays where the work happens — your terminal, your project, your rules — and talks to your code through a small set of honest tools. You ask in plain language. It inspects, edits, runs, verifies, and shows its work. Nothing hidden. Nothing magic.\n\nJust you, your terminal, and an agent that knows its place.\n\n```\nHazzel 0.1.2\n~/hazzel\n\n❯ fix the bug in agent.py\n\n  ● read_file  agent.py\n  ● edit_file  agent.py\n  ● run_command  python -m pytest — passed\n\nHazzel > Fixed. Verified with tests.\n```\n\nMost agents grow into platforms. Hazzel shrinks into a tool.\n\nThe philosophy:\n\n1. **Small beats complicated.** If it can be clear without another abstraction, keep it simple.\n2. **The model requests, Hazzel decides.** The model never touches your machine directly.\n3. **The terminal is enough.** No GUI, no cloud workspace, no lock-in.\n4. **Your keys are yours.** Bring your own Groq / OpenAI / Mistral / Anthropic key.\n5. **Show the work.** Every read, edit, and command is visible.\n\n```\npip install hazzel\n```\n\nRequirements: Python 3.10+, a terminal, and one API key.\n\nFrom source:\n\n```\ngit clone https://github.com/mukundzha/hazzel.git\ncd hazzel\npip install -e .\n```\n\nStart Hazzel from the project you want it to work on:\n\n```\ncd my-project\nhazzel\n```\n\n(`python -m hazzel` works too.)\n\nThat directory becomes the project root. File tools cannot escape it — `../another-project` is rejected.\n\nNo export needed. Just run `/model`, pick a model, and paste your key in the input field when asked — it's saved securely and is the most stable way to stay signed in.\n\nConfig lives at `~/.config/hazzel/config.json` (0600).\n\nTen tools — six for code, four git-native:\n\n| Tool | Story | \n|---|---|\n| `list_files(\".\")` | Look around the room | \n| `read_file(\"src/main.py\")` | Read 60 numbered lines, page with offset | \n| `search_files(\"MAX_ITERATIONS\")` | Grep first, read second — never wander blind | \n| `write_file(\"src/example.py\", \"...\")` | Create, with undo | \n| `edit_file(\"src/main.py\", \"old\", \"new\")` | Small anchored edit, diff preview, undoable | \n| `run_command(\"python -m pytest\")` | Run shell, with approval, timeout, and cap | \n| `git_status()` | Branch + working-tree status, read-only | \n| `git_diff()` | Per-file diff with +/− counts, read-only | \n| `git_commit(\"msg\")` | Diff preview + approval; omit msg to auto-draft from diff | \n| `git_branch(\"list\")` | List, create, switch — writes ask first | \n\nTag files directly: `@src/agent.py fix this`. Tab-completes, highlights, attaches to context.\n\n```\n/model    — switch model / provider\n/plan on  — read-only plan mode: Hazzel explores and proposes, you approve (off by default)\n/prove on — ephemeral smoke check after edits (off by default)\n/status   — git working-tree status\n/diff     — changed files, open any file's full diff\n/commit   — suggest a message from your diff, y/e/n\n/branch   — list / create / switch branches\n/push     — push branch to remote (asks first)\n/pull     — pull remote changes (asks first)\n/sync     — pull then push (asks first)\n/log      — recent commits\n/help     — shortcuts + commands\n/clear    — reset conversation + usage\n/summary  — what did Hazzel just do?\n/usage    — tokens sent, received, cached\n/undo 2   — undo last 2 file changes\n/logout   — clear saved keys\n/exit     — leave\n```\n\nProve mode is optional and off initially. Turn it on with `/prove on`: after each edit Hazzel shows what it will run and asks once (`Run?`), then either writes a happy-path smoke script to `/tmp` (Python changes, imports just work) or runs your repo's suite (`npm test`, `cargo test`, `go test`, `pytest`) for other files — and reports `prove … — passed/failed`. Nothing is written into your project.\n\nPlan mode is read-only and off initially. Turn it on with `/plan on`: Hazzel explores and answers with a numbered plan instead of acting — writes, runs, and commits stay blocked until you approve with `/plan off`. The footer shows `· plan` vs `· build` so the mode is always visible. The `/` menu pages 5 commands at a time with a `(n/total)` counter.\n\nCommands ask first:\n\n```\nHazzel wants to run: python -m pytest\nAllow? [y/N]\n```\n\nEdits show a diff and ask first. Deletes and overwrites are checkpointed for `/undo`.\n\nAnswers stream in token-by-token on all four providers, with automatic fallback to a full response if a stream drops mid-turn.\n\nThe agent is frugal by design: trivial turns (`hi`, `read foo.py`, `list files`) run locally with zero LLM calls, history is compacted to ~2400 tokens, tool output is distilled to ~5000 chars.\n\nPick your pilot with `/model`:\n\n- OpenAI: GPT-6 Astra, GPT-5.6 Sol/Terra/Luna, GPT-5, GPT-5 Mini, GPT-4.1, GPT-4o\n- Anthropic: Claude Fable 5.1, Opus 5, Sonnet 5, Haiku 4.5\n- Mistral: Medium 3.5, Small 4, Large 3, Ministral 3, Codestral, GLM 5.2, Leanstral 1.5\n- Groq: GPT OSS 120B (default), GPT OSS 20B\n\nDefault: `openai/gpt-oss-120b` on Groq.\n\n```\nYou\n ↓\n__main__.py  — listens, routes slash commands\n ↓\nagent.py     — fast-path + tool loop (max 114), history, budget\n ↓\nproviders/   — groq / openai / mistral / anthropic, one interface\n ↓\ntools/       — the only hands that touch your project\n ↓\nsafety.py    — checkpoint before every mutation\n ↓\nui.py + formatter.py — spinners, streaming answers, diffs, markdown, token meter\n```\n\nThe model decides *what*. Hazzel decides *whether and how*. Tools do the work.\n\n```\nsrc/hazzel/\n  __main__.py  agent.py  config.py\n  llm.py  mentions.py  safety.py  tokens.py\n  git.py  git_suggest.py  ui.py  formatter.py\n  providers/base.py groq.py openai.py mistral.py anthropic.py\n  tools/list_files.py read_file.py search_files.py\n       write_file.py edit_file.py run_command.py\n       git_status.py git_diff.py git_commit.py git_branch.py\n```\n\nHazzel is an agent, not a sandbox. `run_command` runs on your machine — only approve what you understand.\n\nFile writes/edits/`rm` are undoable. Nothing leaves the project root without your `y`.\n\n`0.1.4` — early, deliberate, reliable foundation. Not big, on purpose.\n\nIncluded: terminal UI, multi-provider, tool-calling, @mentions, history compaction, undo, approval, timeout, token usage, markdown rendering, streaming answers, plan mode, git-native status/diff/commit/branch with message suggestions.\n\nNot yet: background commands, session persistence, IDE plugins. Omissions, not oversights.\n\nBuilt by **Mukund Jha** — [mukundzha33@gmail.com](mailto:mukundzha33@gmail.com)\n\nLicense: AGPL-3.0-or-later — see [LICENSE](/mukundzha/hazzel/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-hazzel-a-tiny-minimal-git-native-coding-agent", "canonical_source": "https://github.com/mukundzha/hazzel", "published_at": "2026-09-09 12:22:17+00:00", "updated_at": "2026-09-09 12:45:48.195844+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "ai-products"], "entities": ["Hazzel", "Groq", "OpenAI", "Mistral", "Anthropic", "Python"], "alternates": {"html": "https://wpnews.pro/news/show-hn-hazzel-a-tiny-minimal-git-native-coding-agent", "markdown": "https://wpnews.pro/news/show-hn-hazzel-a-tiny-minimal-git-native-coding-agent.md", "text": "https://wpnews.pro/news/show-hn-hazzel-a-tiny-minimal-git-native-coding-agent.txt", "jsonld": "https://wpnews.pro/news/show-hn-hazzel-a-tiny-minimal-git-native-coding-agent.jsonld"}}