Hax – a minimalist, terminal-native coding agent written in C
Hax: A Lean, C-Powered Terminal Coding Agent
hax is a minimalist, terminal-native coding agent engineered entirely in C. It is designed for those who prefer a stripped-down, high-performance interface over bloated IDE integrations.
"If 'fancy new AI tech in an old-school minimalist package' sounds like your vibe, you might like this."
🚀 Core Philosophy & Design
Hax is built to be invisible yet powerful. Unlike modern agents that bundle heavy runtimes, Hax focuses on efficiency and the Unix philosophy.
Lightweight Architecture
By utilizing a single native C binary with minimal dependencies, Hax ensures that system resources are preserved for the actual intelligence—the LLM.
Since hax only consumes a few MBs, the variable is negligible, leaving maximum headroom for local models.
The "Minimalist" Approach
Hax deliberately avoids "feature creep." Here is how it compares to traditional AI agents:
What Hax explicitly excludes:
MCP MarketplacesPlugin RuntimesIDE Side-panelsPer-command permission prompts
Note: The reasoning for these omissions is detailed in the docs/philosophy.md file.
🛠 Technical Features
Local Model Integration
Local LLMs are treated as first-class citizens. Hax automatically detects runtime capabilities, meaning you don't need complex provider configuration blocks for standard setups.
Example Workflow:
- Start your server:
llama-server -m [model].gguf - Launch the agent:
hax --provider llama.cpp
Terminal-First UX
Hax respects the terminal environment. It provides Streaming Markdown and live tool output that is reflowed to fit your window. To maintain a clean history, it only redraws the active streaming line or the input area, ensuring your native scrollback remains intact.
Transparency & Compatibility
You can audit every interaction. By pressing Ctrl+T, you enter a transcript view to see the exact prompts sent and the raw responses received.
| Provider | Compatibility |
|---|---|
| OpenAI | Native & Compatible APIs |
| Anthropic | Native & Compatible APIs |
| Codex | Via ChatGPT Subscription |
| OpenRouter | Supported |
| llama.cpp | First-class local support |
Unix Compliance
Hax behaves like a proper Unix tool:
- Follows XDG paths.
- Uses plain-text for configuration and session files.
- In
-p(one-shot) mode,stdoutremains clean, while resume hints are sent tostderr. - Prefers subprocess composition over a proprietary plugin system.
📦 Installation
Hax is available for Linux and macOS. Windows users should run it via WSL.
Option 1: Quick Install
- macOS/Linux (Homebrew):
brew install oleksandrchekhovskyi/hax/hax - Linux (Static Binary): Download the
x86_64oraarch64binary from the latest release and move it to a directory in yourPATH.
Option 2: Build from Source
Building from source links the binary against your specific system libraries.
# Clone the repository
git clone https://github.com/OleksandrChekhovskyi/hax.git
cd hax
# Install dependencies (C compiler, libcurl, jansson, meson, ninja, pkg-config, fzf)
scripts/install_deps.sh
# Compile and install
make
make install # Optional; may require sudo
⌨️ Usage Guide
Run hax from within the project directory you wish to analyze.
Command Reference
| Command | Description |
|---|---|
hax | Launch the interactive REPL |
hax -p "prompt" | One-shot mode: execute prompt and print result |
printf "text" | hax -p | Pipe a prompt from stdin |
hax -c | Continue the most recent session in the current directory |
hax --resume | Select a previous session from a list |
hax --resume=ID -p "..." | Resume a specific session ID in one-shot mode |
First-Run Tips
The most intuitive way to start is the interactive mode:
- Run
hax. - Type
/providerto view and select your preferred model/provider. - Hax will remember your provider, model, and effort settings for future sessions.
For deeper configuration, refer to the README and full documentation.