Hazzel: Minimal and Transparent Coding Agent with Safety Features
Hazzel is a minimal and transparent coding agent with a 10k line Python codebase, allowing end-to-end tracing, undo functionality, and safety measures such as diff-preview editing and shell command timeouts.
Minimal and Transparent Codebase
Hazzel is a minimal and transparent coding agent designed with a focus on simplicity and control. The entire codebase is approximately 10k lines of Python, allowing users to trace the application end to end. Key components such as the main loop are located in agent/core.py, while all available actions are defined in the tools/ directory. The undo system is fully contained in safety.py, and the agent pauses before every write to confirm the action with the user. Verification of specific claims can be done in about 200 lines of code, including files like src/hazzel/safety.py and src/hazzel/tools/run_command.py. Hazzel also supports extension without lock-in, featuring a minimal MCP stdio client that uses only the standard library. Any server can be connected via a configuration file located at .hazzel/mcp.json.
Installation and Usage
Installation of Hazzel is streamlined, requiring no virtual environments or complex setup. Users can try it with uvx hazzel, or install it permanently via pip install hazzel or uv tool install hazzel. An API key for a provider like Groq is optional and can be configured later using the /model command. Once installed, Hazzel operates within a project directory with minimal ceremony — no configuration quizzes or lengthy setup. Commands are read-only by default, and any disk-modifying actions are paused for review via a diff. A small set of shell commands, such as ls, cat, and git status, are allowed to bypass the queue for efficiency. Users are encouraged to star Hazzel if it resolves a failing test, helping others discover its utility.
Undo and Safety Features
Hazzel, a minimal terminal coding agent, introduces robust undo and safety features designed to enhance developer control and reduce errors. Prior bytes are snapshotted to ~/.config/hazzel/undo/ (200 events, 20 per file) before any changes are applied, ensuring a reliable history of modifications. The /undo command reverts only the agent's hunks, preserving any edits made afterwards. Users are encouraged to preview changes before applying them, with --force available for blind restores and /redo to reapply previous actions. Additional safety measures include diff-preview editing, shell with timeouts, and support for background jobs via /jobs. Hazzel also allows fetching documentation from URLs and using @image.png for vision-capable models, emphasizing a balance between minimalism and functionality.
Provider Flexibility and Cost Model
Hazzel offers provider flexibility by allowing users to set their preferred API key via environment variables, bypassing in-app prompts. Supported providers include Groq, OpenAI, Anthropic, Mistral, Gemini, DeepSeek, and OpenRouter, with over 100 models accessible through a single key. For local use, Ollama is supported without requiring an API key, with the option to override the default host. Users can switch providers anytime using the /model command.
Hazzel does not meter usage, meaning users pay their provider directly or run locally at no cost. This model gives users full control over costs and infrastructure. A variety of commands are available for managing models, tracking usage, and interacting with Git, including /usage, /commit, and /diff. Additional features include session management, file attachment, and command filtering, all accessible from the terminal interface.
Integration and Philosophy
Hazzel positions itself as a minimal terminal coding agent designed to complement, rather than replace, existing editors. It operates alongside your preferred development environment, staying small and focused on core functionality. This philosophy ensures that users retain control over their workflow without being overwhelmed by additional features or automation. According to the project’s documentation, Hazzel is not intended for users seeking a heavier, more automated agent, as better alternatives exist for such needs. The project encourages community involvement, emphasizing that support can be as simple as using the tool, reporting issues, or contributing code. This approach reflects a commitment to maintaining a lightweight, user-driven development process.
Sources and reporting notes
Based on published source material. No independent hands-on testing is claimed.