Repolode
OleksandrChekhovskyi

OleksandrChekhovskyi/hax

A minimalist, terminal-native coding agent written in C that works with local llama.cpp models and many cloud LLM providers.

Open-source alternative to:Claude Code

Stars
974
Forks
67
Open issues
21
Last commit
8 days ago

What is it?

hax is a coding agent that runs in the terminal as a single native C binary with a small dependency set. It offers an interactive REPL, a one-shot mode (`-p`) that prints only the final answer to stdout, and session resume for continuing past conversations in a given project directory.

It connects to OpenAI and compatible endpoints, Anthropic, Codex via a ChatGPT subscription, OpenRouter, OpenCode Zen/Go, DeepSeek, llama.cpp, Ollama, and custom endpoints. With a running llama-server, hax auto-discovers the loaded model and its capabilities without a provider config block.

hax streams Markdown and tool output while leaving native terminal scrollback intact. A transcript view (Ctrl+T) shows exactly what was sent to the model and what it replied, and an optional wire protocol trace can be collected. Configuration and session files are plain text, and extensions are handled through external subprocesses rather than a plugin runtime.

Key features

  • 01Single native C binary with a small dependency set and low memory use.
  • 02Auto-discovers models served by llama.cpp without manual provider configuration.
  • 03Streams Markdown and tool output while preserving terminal scrollback.
  • 04Transcript view and optional wire protocol trace show exact model requests and replies.
  • 05Supports many providers, including OpenAI, Anthropic, OpenRouter, DeepSeek, Ollama, and custom endpoints.
  • 06Plain-text config and session files, with XDG-compliant paths.

Use cases

  • Running a coding assistant against a local llama.cpp or Ollama model.
  • Scripting one-shot prompts from the shell with clean stdout output.
  • Auditing exactly what a coding agent sends to and receives from a model.
  • Using an agent on resource-constrained machines or packaging it for Linux distributions.

Quick start

  1. 1

    Install via Homebrew

    brew install oleksandrchekhovskyi/hax/hax
  2. 2

    Start a local llama.cpp server with your model

    llama-server -m [model].gguf
  3. 3

    Run hax against the llama.cpp provider

    hax --provider llama.cpp

Things to know

  • Windows is not supported natively; it must run under WSL.
  • BSD systems support building from source only.
  • Some advanced features like MCP marketplaces, plugins, IDE panels and permission prompts are deliberately omitted.

In collections

Topics

FAQ

What is hax?
A minimalist, terminal-native coding agent written in C that works with local llama.cpp models and many cloud LLM providers. hax is a coding agent that runs in the terminal as a single native C binary with a small dependency set. It offers an interactive REPL, a one-shot mode (`-p`) that prints only the final answer to stdout, and session resume for continuing past conversations in a given project directory.
Is hax free to use? What license does it have?
hax is open source under the MIT license. Check the license terms before using it in commercial products.
Is hax still maintained?
Actively maintained. The last commit to hax was on Oct 30, 2026.
What can I use hax for?
Running a coding assistant against a local llama.cpp or Ollama model. Scripting one-shot prompts from the shell with clean stdout output. Auditing exactly what a coding agent sends to and receives from a model. Using an agent on resource-constrained machines or packaging it for Linux distributions.
How do I install hax?
Install via Homebrew: brew install oleksandrchekhovskyi/hax/hax Start a local llama.cpp server with your model: llama-server -m [model].gguf Run hax against the llama.cpp provider: hax --provider llama.cpp
Where can I get hax?
The source code and installation instructions are on GitHub: https://github.com/OleksandrChekhovskyi/hax

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects