@kolisachint/hoocode

中文文档
0.2.29发布于 2026/11/01MIT零依赖构建来源已验证

hoocode, the terminal coding agent

原始使用文档
文档目录8 节
  1. Install
  2. Quick start
  3. Configuration
  4. Documentation
  5. Contributing
  6. Try it and tell us
  7. Credits
  8. License

hoocode

A terminal coding agent, written in Rust. One static binary, any model provider, nothing applied without your say-so.

CI Latest release npm PyPI MIT license

hoocode in a terminal: asked to make mean() return an Option, it reads src/lib.rs, shows the edit as a diff and waits for approval, runs cargo test after a second approval (1 passed), sums up, and then opens the slash-command menu

The real binary; only the model is scripted, so the demo can be recorded again for each release (scripts/demo/record.sh).


hoocode reads your code, runs commands, edits files and talks to the model of your choice, from a full-screen terminal UI or as a one-shot command. It is a single native binary: no Node, no Python, no runtime to install.

  • Any provider. Anthropic, OpenAI, Google, OpenRouter, Groq, DeepSeek, xAI, Fireworks and more, by API key or by /login (Anthropic, GitHub Copilot, OpenAI Codex, Google).
  • You stay in control. Shell, Edit and Write ask first (Yes / No / Always). Four agent modes (ask, plan, build, debug) scope what the agent may do.
  • Subagents. The agent can hand work to background subagents and keep going; their tool calls go through the same approval gate as the main agent.
  • Sessions you can come back to. --continue, /resume, /fork, /tree, and automatic compaction of long conversations.
  • Extensible with open formats. AGENTS.md / CLAUDE.md context files, skills, prompt templates and slash commands, MCP servers, plugins, themes and keybindings.
  • Scriptable. Print mode (-p) with text or JSON output, and a JSON-RPC mode (--mode rpc) for driving hoocode from another program.

Install

hoocode runs on macOS and Linux, on x64 and arm64. The Linux builds are static (musl), so one binary runs on any distro. There is no Windows build yet.

Install script (no root, no Node):

curl -fsSL https://kolisachint.github.io/hoocode/install.sh | sh

It downloads the release archive for your platform, checks it against the release's SHA256SUMS, installs ~/.hoocode/bin/hoocode (plus a hoo alias) and adds ~/.hoocode/bin to your PATH. Pass --help for the options (--version, --dir, --no-modify-path). The script is install/install.sh in this repo.

npm or bun (Node 18 or newer):

npm install -g hoocode     # or: bun add -g hoocode

The package pulls in only the native binary for your platform. It installs hoocode and hoo.

pip (Python 3.8 or newer):

pip install hoocode        # or: pipx install hoocode

A thin launcher: on first run it downloads the release binary for your platform, checks its sha256 against SHA256SUMS and caches it under ~/.cache/hoocode/.

Prebuilt binaries. Every GitHub release has hoocode-<target>.tar.gz for x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, x86_64-apple-darwin and aarch64-apple-darwin, and a SHA256SUMS file. Unpack it and put hoocode on your PATH:

tar xzf hoocode-aarch64-apple-darwin.tar.gz
install -m 755 hoocode-aarch64-apple-darwin/hoocode ~/.local/bin/hoocode

From source (Rust 1.88 or newer; the repo pins its dev toolchain in rust-toolchain.toml, which rustup picks up by itself):

git clone https://github.com/kolisachint/hoocode
cd hoocode
cargo install --locked --path crates/hoocode-code-main --bin hoocode

Or run scripts/install.sh, which builds a release binary and installs it as hoocode and hoo. By default, it updates $HOOCODE_INSTALL_DIR/bin when that directory already contains an executable hoocode; if HOOCODE_INSTALL_DIR is unset, it checks ~/.hoocode/bin instead. Otherwise, it installs into ~/.local/bin. Pass --prefix DIR to override the destination.

hoocode is not on crates.io or Homebrew.

Updating. hoocode update prints the right update command for how you installed it.

Quick start

export ANTHROPIC_API_KEY=...          # or any provider key, see `hoocode --help`
cd your-project
hoocode                               # full-screen interactive session

No API key? Start hoocode and run /login to sign in with a subscription instead.

A few things to try in the interactive session:

TypeWhat it does
/modelPick a model (Ctrl+P cycles through your favourites)
/modeSwitch between ask, plan, build and debug
/resumeReopen an earlier session in this folder
@path/to/fileAttach a file to your message
/hotkeysShow the keyboard shortcuts
/settingsChange settings

One-shot and scripted use:

hoocode -p "Summarize this repo"                        # print the answer and exit
hoocode -p --mode json "List the TODOs in src/"         # JSON event stream
hoocode --model anthropic/claude-sonnet-4-5 "Review the last commit"
hoocode --continue "And now fix the first one"          # continue the last session
hoocode --tools Read,CodeSearch -p "Review src/"        # read-only run
hoocode --mode rpc                                      # JSON-RPC over stdin/stdout

Plugins add skills, subagents and MCP servers. Add a git marketplace, then install from it, from the shell or with /plugin in a session:

hoocode plugin marketplace add <git-url-or-owner/repo>
hoocode install <plugin>@<marketplace>     # --scope project for this repo only
hoocode list

hoocode --help lists every flag and the provider environment variables; hoocode --list-models [search] lists the models it knows.

Configuration

Everything hoocode keeps lives in ~/.hoocode. Set HOOCODE_CODING_AGENT_DIR to move it.

File or folderWhat it holds
~/.hoocode/settings.jsonGlobal settings (/settings edits it)
.hoocode/settings.jsonPer-project settings, merged over the global ones
~/.hoocode/auth.jsonLogins and keys saved by /login
~/.hoocode/models.jsonYour own providers and models (for example a local OpenAI-compatible server)
~/.hoocode/hoo-config.jsonAgent modes and tool approval rules (auto_allow)
~/.hoocode/skills/, .hoocode/skills/Skills, global and per project
~/.hoocode/themes/Custom themes
~/.hoocode/sessions/Saved sessions, one JSONL file each, in a folder per project (HOOCODE_CODING_AGENT_SESSION_DIR or --session-dir moves them)
~/.agents/mcp.json, .agents/mcp.jsonMCP servers, global and per project (/mcp shows their state)
~/.agents/plugins/, .agents/plugins/Plugins, user and per project (hoocode install, hoocode list, or /plugin in a session)
AGENTS.md or CLAUDE.mdProject instructions, read from the working folder and its parents

Because sessions are saved as files, you can resume, fork or export them (/export <file>.jsonl). --no-session keeps a run ephemeral, and --offline turns off startup network calls such as the version check.

Documentation

Contributing

Try it and tell us

The most useful thing you can do is try hoocode and tell us how it went.

CONTRIBUTING.md covers the dev loop (fmt, clippy, nextest), where tests go and how releases work. Please read the code of conduct, and report security problems privately as described in SECURITY.md.

If hoocode is useful to you, a star on the repo helps other people find it.

Credits

hoocode began as a fork of pi-mono by Mario Zechner, which is MIT-licensed. Its copyright notice is kept in LICENSE. Thanks to Mario and the upstream contributors.

License

MIT, see LICENSE.

版本与发布记录

@kolisachint/hoocode 共发布 73 个版本,首次发布于 2026/10/01;过去 12 个月发布了 73 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.2.29latest2026/11/011 天前
0.2.282026/11/012 天前
0.2.272026/10/313 天前
0.2.262026/10/313 天前
0.2.252026/10/313 天前
0.2.242026/10/313 天前

关于 @kolisachint/hoocode 的常见问题

@kolisachint/hoocode 是什么?

Hoocode,终端编码代理

如何安装 @kolisachint/hoocode?

在项目目录运行 npm install @kolisachint/hoocode,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 hoo、hoocode,可以用 npx hoo 直接运行。

@kolisachint/hoocode 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/kolisachint__hoocode 是否存在。

@kolisachint/hoocode 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@kolisachint/hoocode 可以商用吗?

@kolisachint/hoocode 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@kolisachint/hoocode 还在维护吗?

最新版本 0.2.29 发布于 2026/11/01(1 天前);至今共发布 73 个版本,其中过去 12 个月发布了 73 个;首次发布于 2026/10/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。