OleksandrChekhovskyi/hax

A minimalist, terminal-native coding agent written in C.

hax – a minimalist terminal‑native coding agent

What it is

  • hax is 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, hax offers 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-server or ollama serve are 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‑web for web search, hax‑mcp for MCP‑related tools) that can be called from the agent.

Getting started

  1. Install – via Homebrew (brew install .../hax), Arch AUR, pre‑built binaries, or build from source with make.
  2. Connect a provider – start hax, run the /provider command, and select a model. For local models, just run llama-server -m model.gguf (or ollama serve).
  3. Use it –
    • Interactive REPL: hax
    • One‑shot prompt: hax -p "explain x"
    • Pipe input: printf "list TODOs" | hax -p
    • Resume a previous session: hax --resume or hax -c.
  4. 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