메뉴
HN
Hacker News • 44일 전

C언어로 작성된 초경량 터미널 코딩 에이전트, Hax

IMP
6/10
핵심 요약

Hax는 단일 C 바이너리로 구동되는 초경량 터미널 코딩 에이전트로, 시스템 메모리를 거의 차지하지 않아 로컬 LLM 구동에 유리합니다. 복잡한 플러그인 기능을 배제하고 유닉스 철학에 입각해 가벼움과 투명성에 집중한 것이 특징이며, 주로 터미널 환경과 로컬 모델을 선호하는 개발자들을 위한 도구입니다.

번역된 본문

가벼움 by 디자인: 단일 네이티브 C 바이너리로 의존성이 적습니다. 즉시 시작되며, 매우 적은 메모리(단 몇 MB)만 사용하므로 로컬 LLM을 위해 더 많은 RAM을 남길 수 있습니다. 로컬 모델을 최우선으로: hax는 모델과 런타임 기능을 자동으로 감지합니다. 기본 설정에 맞춤형 제공자(Provider) 구성 블록이 필요하지 않습니다. (사용 예: llama-server -m [model].gguf 실행 후 hax --provider llama.cpp) 터미널 환경 존중: 스트리밍 Markdown과 실시간 도구 출력이 터미널 디스페이에 맞게 재배치됩니다. 현재 스트리밍 중인 줄이나 입력 영역만 다시 그리며, 기본 스크롤백은 보존됩니다. 터미널을 장악하거나 엉망으로 만들지 않습니다. 검사 가능: 사용 가능한 대화 내역 보기(Ctrl+T)를 통해 모델에 정확히 전송된 내용과 응답을 확인할 수 있습니다. 필요에 따라 세부 통신 프로토콜 추적을 수집할 수도 있습니다. 모든 제공자/모델 지원: OpenAI(+호환 모델), Anthropic(+호환 모델), Codex(ChatGPT 구독 연동), OpenRouter, llama.cpp 등을 지원합니다. 모범적인 유닉스 도구: XDG 경로를 준수하며, -p 원샷 모드에서는 stderr에 재개 힌트를 남기고 stdout을 깔끔하게 유지합니다. 일반 텍스트 기반의 구성 및 세션 파일을 사용하며, 플러그인 대신 서브프로세스를 통한 조합을 지원합니다. 대상 독자: 터미널에서 주로 작업하거나, 로컬 모델을 실행하거나, 사용하는 도구가 하는 일을 감사(audit)하거나, 리눅스 배포판용 소프트웨어를 패키징하거나, 리소스가 부족한 환경에서 에이전트를 실행하는 개발자를 대상으로 합니다. MCP 마켓플레이스, 플러그인 런타임, IDE 패널 또는 명령어별 권한 프롬프트를 원한다면 다른 에이전트들이 딱 그 목적에 맞게 만들어져 있습니다. hax는 의도적으로 그러한 기능을 제공하지 않으며, docs/philosophy.md 파일에서 각 생략된 이유와 그 필요를 충족하는 패턴을 설명합니다. "오래된 미니멀리즘 패키지 안의 세련된 새로운 AI 기술"이 당신의 취향에 맞는다면, 이 도구가 마음에 드실 겁니다.

$ 시작하기 hax는 Linux 및 macOS에서 실행됩니다. Windows에서는 WSL 환경에서 사용하세요.

  • Homebrew 사용 (macOS 또는 Linux): brew install oleksandrchekhovskyi/hax/hax
  • Linux의 경우, 최신 릴리스에서 아키텍처(x86_64 또는 aarch64)에 맞는 사전 빌드된 정적 바이너리를 다운로드한 후, PATH가 설정된 디렉터리에 hax 바이너리의 압축을 풉니다.
  • 소스에서 빌드하면 정적 바이너리 대신 시스템의 공유 라이브러리에 연결된 바이너리가 생성됩니다:
git clone https://github.com/OleksandrChekhovskyi/hax.git
cd hax
scripts/install_deps.sh # Debian/Ubuntu, Fedora, Arch, openSUSE, Alpine, macOS
make # 이제 바이너리가 ./build/hax 에 생성됩니다
make install # 선택 사항; sudo 권한을 요구할 수 있습니다

scripts/install_deps.sh는 C 컴파일러, libcurl, jansson, meson, ninja, pkg-config 등의 빌드 종속성과, 사용 가능한 경우 @file 완성에 사용되는 fzf를 설치합니다.

작업하길 원하는 프로젝트 디렉터리에서 hax를 실행하세요:

hax # 대화형 REPL 실행
hax -p "list TODOs" # 단일 프롬프트를 실행하고 최종 답변 출력
printf "explain x" | hax -p # 표준 입력(stdin)에서 프롬프트 읽기
hax -c # 해당 디렉터리의 최신 세션 계속하기
hax --resume # 해당 디렉터리의 이전 세션 선택
hax --resume=ID -p "next" # 원샷 모드에서 특정 세션 재개

가장 쉬운 첫 실행 방법은 대화형 모드입니다. hax를 시작한 다음 /provider를 사용하여 사용 가능한 제공자를 보고 모델을 선택하세요. hax는 대화형 제공자, 모델 및 노력(effort) 선택을 기억합니다. 제공자 설정 및 전체 문서는 README를 참조하세요.

원문 보기
원문 보기 (영어)
> Lightweight by design A single native C binary with a small dependency set. Starts instantly, and uses a very small amount of memory (just a few MBs) — so more RAM is left for your local LLMs. > Local models are first-class hax auto-discovers the model and runtime capabilities. No custom provider config block needed for the default setup. llama-server -m [model].gguf hax --provider llama.cpp > Respects your terminal Streaming Markdown and live tool output, reflowed for display in the terminal. Only redraws the current streaming line or the input area, native scrollback is preserved. Does not take over or mess with your terminal. > Inspectable See exactly what was sent to the model and what it replied in a usable transcript view (Ctrl+T). Optionally collect a detailed wire protocol trace. > Use any provider/model Supports OpenAI (+compatible), Anthropic (+compatible), Codex (via ChatGPT subscription), OpenRouter, llama.cpp, etc. > Well-behaved Unix tool XDG paths, clean stdout in -p one-shot mode with resume hints on stderr, plain-text config and session files, composition via subprocesses instead of plugins. > Target audience Developers who live in the terminal, run local models, audit what their tools do, package software for distros, or run agents where resources are scarce. If you want MCP marketplaces, a plugin runtime, IDE panels, or per-command permission prompts, other agents build exactly that — hax deliberately doesn't, and docs/philosophy.md explains each omission and the pattern that covers the need. If "fancy new AI tech in an old-school minimalist package" sounds like your vibe, you might like this. $ Get started hax runs on Linux and macOS; on Windows, use it under WSL . With Homebrew (macOS or Linux): brew install oleksandrchekhovskyi/hax/hax On Linux, download the prebuilt static binary for your architecture (x86_64 or aarch64) from the latest release , then unpack the hax binary into any directory on your PATH . Building from source gives a binary linked against your system's shared libraries instead of a static one: git clone https://github.com/OleksandrChekhovskyi/hax.git cd hax scripts/install_deps.sh # Debian/Ubuntu, Fedora, Arch, openSUSE, Alpine, macOS make # the binary is now at ./build/hax make install # optional; may prompt for sudo scripts/install_deps.sh installs the build dependencies — a C compiler, libcurl, jansson, meson, ninja, and pkg-config — plus fzf , which hax uses for @file completion when available. Run hax from the project directory you want it to work in: hax # interactive REPL hax -p "list TODOs" # run one prompt and print the final answer printf "explain x" | hax -p # read the prompt from stdin hax -c # continue the latest session for this directory hax --resume # pick a past session for this directory hax --resume=ID -p "next" # resume a specific session in one-shot mode The easiest first run is interactive: start hax , then use /provider to see available providers and choose a model. hax remembers interactive provider, model, and effort selections. See the README for provider setup and the full documentation.