OleksandrChekhovskyi/hax
A minimalist, terminal-native coding agent written in C.
hax – a minimalist terminal‑native coding agent
What it is
haxis a small, single‑binary command‑line tool written in C that lets you talk to large language models (LLMs) from the terminal. It works with many providers – OpenAI, Anthropic, Codex, OpenRouter, DeepSeek, llama.cpp, Ollama, etc. – and is designed to start instantly, use only a few megabytes of RAM, and play nicely with your shell.
Why it matters
- For developers who spend most of their time in a terminal and want an AI “assistant” without the overhead of heavyweight IDE plugins or web UIs,
haxoffers a lean, auditable alternative. Its design emphasizes transparency (you can view the exact request/response transcript), Unix‑style composability, and easy integration with local models.
Key features
- Lightweight – a single native C binary, static builds for Linux, minimal runtime dependencies.
- Provider‑agnostic – built‑in support for a wide range of APIs; local models via
llama-serverorollama serveare first‑class. - Terminal‑friendly UI – streaming Markdown, live tool output, and a transcript view (
Ctrl+T) that respects the terminal’s scrollback. - Inspectability – you can dump the raw wire‑protocol exchange or enable a detailed trace for debugging.
- Unix‑philosophy compliance – XDG‑based config, clean stdout in one‑shot mode, plain‑text session files, and composition via subprocesses rather than a plugin system.
- Extensible companions – optional Python helpers (
hax‑webfor web search,hax‑mcpfor MCP‑related tools) that can be called from the agent.
Getting started
- Install – via Homebrew (
brew install .../hax), Arch AUR, pre‑built binaries, or build from source withmake. - Connect a provider – start
hax, run the/providercommand, and select a model. For local models, just runllama-server -m model.gguf(orollama serve). - Use it –
- Interactive REPL:
hax - One‑shot prompt:
hax -p "explain x" - Pipe input:
printf "list TODOs" | hax -p - Resume a previous session:
hax --resumeorhax -c.
- Interactive REPL:
- Configure – optional
~/.config/hax/config.toml(or similar) for defaults; environment variables for API keys.
Who it’s for
- Terminal‑centric developers, sysadmins, or hobbyists who run local LLMs and want a fast, auditable AI assistant.
- Packagers and distro maintainers, because the project follows Unix conventions and has a tiny dependency footprint.
- Users with constrained resources (e.g., low‑end laptops, embedded Linux) who need an agent that leaves most RAM for the model itself.
License
- Distributed under the MIT License.
All information is taken directly from the repository’s README; no additional features are inferred.
Related
- Project
- Project
- Project
- Project
- Project