@kolisachint/hoocode 0.1.41 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +158 -128
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,170 +1,200 @@
1
- # hoocode
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/brand/hoocode.svg">
4
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/brand/hoocode-light.svg">
5
+ <img alt="hoocode" width="360" src="docs/assets/brand/hoocode.svg">
6
+ </picture>
7
+ </p>
8
+
9
+ <p align="center">A terminal coding agent, written in Rust. One static binary, any model provider, nothing applied without your say-so.</p>
10
+
11
+ <p align="center">
12
+ <a href="https://github.com/kolisachint/hoocode/actions/workflows/ci.yml"><img src="https://github.com/kolisachint/hoocode/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
13
+ <a href="https://github.com/kolisachint/hoocode/releases/latest"><img src="https://img.shields.io/github/v/release/kolisachint/hoocode?sort=semver" alt="Latest release"></a>
14
+ <a href="https://www.npmjs.com/package/hoocode"><img src="https://img.shields.io/npm/v/hoocode?label=npm" alt="npm"></a>
15
+ <a href="https://pypi.org/project/hoocode/"><img src="https://img.shields.io/pypi/v/hoocode?label=PyPI" alt="PyPI"></a>
16
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
17
+ </p>
18
+
19
+ <p align="center">
20
+ <img src="docs/assets/demo.gif" alt="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" width="800">
21
+ </p>
22
+
23
+ <p align="center"><sub>The real binary; only the model is scripted, so the demo can be recorded again for each release (<code>scripts/demo/record.sh</code>).</sub></p>
24
+
25
+ ---
26
+
27
+ hoocode reads your code, runs commands, edits files and talks to the model of your
28
+ choice, from a full-screen terminal UI or as a one-shot command. It is a single native
29
+ binary: no Node, no Python, no runtime to install.
30
+
31
+ - **Any provider.** Anthropic, OpenAI, Google, OpenRouter, Groq, DeepSeek, xAI, Fireworks
32
+ and more, by API key or by `/login` (Anthropic, GitHub Copilot, OpenAI Codex, Google).
33
+ - **You stay in control.** Shell, Edit and Write ask first (Yes / No / Always). Four
34
+ agent modes (ask, plan, build, debug) scope what the agent may do.
35
+ - **Subagents.** The agent can hand work to background subagents and keep going; their
36
+ tool calls go through the same approval gate as the main agent.
37
+ - **Sessions you can come back to.** `--continue`, `/resume`, `/fork`, `/tree`, and
38
+ automatic compaction of long conversations.
39
+ - **Extensible with open formats.** `AGENTS.md` / `CLAUDE.md` context files, skills,
40
+ prompt templates and slash commands, MCP servers, plugins, themes and keybindings.
41
+ - **Scriptable.** Print mode (`-p`) with text or JSON output, and a JSON-RPC mode
42
+ (`--mode rpc`) for driving hoocode from another program.
43
+
44
+ ## Install
45
+
46
+ hoocode runs on **macOS and Linux, on x64 and arm64**. The Linux builds are static
47
+ (musl), so one binary runs on any distro. There is no Windows build yet.
48
+
49
+ **Install script** (no root, no Node):
2
50
 
3
- hoocode is a coding agent in Rust. It fully replaces the earlier TypeScript build, hoocode-ts (retired 2026-10-10).
51
+ ```bash
52
+ curl -fsSL https://kolisachint.github.io/hoocode/install.sh | sh
53
+ ```
4
54
 
5
- This is a multi-crate workspace that mirrors the structure of the [pycortex](https://github.com/kolisachint/pycortex) Python migration. Each namespace (`ai`, `agent`, `code`, `tui`) is split into focused, version-locked crates published to crates.io.
55
+ It downloads the release archive for your platform, checks it against the release's
56
+ `SHA256SUMS`, installs `~/.hoocode/bin/hoocode` (plus a `hoo` alias) and adds
57
+ `~/.hoocode/bin` to your `PATH`. Pass `--help` for the options (`--version`, `--dir`,
58
+ `--no-modify-path`). The script is [`install/install.sh`](install/install.sh) in this repo.
6
59
 
7
- ## Workspace structure
60
+ **npm or bun** (Node 18 or newer):
8
61
 
62
+ ```bash
63
+ npm install -g hoocode # or: bun add -g hoocode
9
64
  ```
10
- crates/
11
- hoocode-ai-types/
12
- hoocode-ai-models/
13
- ...
14
- hoocode-agent-core/
15
- ...
16
- ...
17
- ...
18
- ```
19
-
20
- All crates share a single lockstep version defined in the workspace `Cargo.toml`.
21
65
 
22
- ## Installation
66
+ The package pulls in only the native binary for your platform. It installs `hoocode`
67
+ and `hoo`.
23
68
 
24
- **macOS / Linux** (no root, no Node):
69
+ **pip** (Python 3.8 or newer):
25
70
 
26
71
  ```bash
27
- curl -fsSL https://kolisachint.github.io/hoocode/install.sh | sh
72
+ pip install hoocode # or: pipx install hoocode
28
73
  ```
29
74
 
30
- It installs `~/.hoocode/bin/hoocode` (and `hoo`), checks the download against the
31
- release's `SHA256SUMS`, and adds `~/.hoocode/bin` to `PATH`. `--help` lists the
32
- options (`--version`, `--dir`, `--no-modify-path`).
75
+ A thin launcher: on first run it downloads the release binary for your platform,
76
+ checks its sha256 against `SHA256SUMS` and caches it under `~/.cache/hoocode/`.
33
77
 
34
- **npm / bun:**
78
+ **Prebuilt binaries.** Every [GitHub release](https://github.com/kolisachint/hoocode/releases)
79
+ has `hoocode-<target>.tar.gz` for `x86_64-unknown-linux-musl`,
80
+ `aarch64-unknown-linux-musl`, `x86_64-apple-darwin` and `aarch64-apple-darwin`, and a
81
+ `SHA256SUMS` file. Unpack it and put `hoocode` on your `PATH`:
35
82
 
36
83
  ```bash
37
- npm install -g @kolisachint/hoocode # or: bun add -g @kolisachint/hoocode
84
+ tar xzf hoocode-aarch64-apple-darwin.tar.gz
85
+ install -m 755 hoocode-aarch64-apple-darwin/hoocode ~/.local/bin/hoocode
38
86
  ```
39
87
 
40
- The package pulls in only the binary for your platform (macOS or Linux, x64 or
41
- arm64). There is no Windows build yet.
42
-
43
- ### From source
44
-
45
- The command is **`hoocode`** (alias `hoo`).
88
+ **From source** (Rust 1.88 or newer; the repo pins its dev toolchain in
89
+ [`rust-toolchain.toml`](rust-toolchain.toml), which rustup picks up by itself):
46
90
 
47
91
  ```bash
48
92
  git clone https://github.com/kolisachint/hoocode
49
93
  cd hoocode
50
- scripts/install.sh # → updates ~/.hoocode/bin/hoocode if installed, else ~/.local/bin
51
- scripts/install.sh --prefix /usr/local/bin --also-hoocode # also keep a `hoocode` link
94
+ cargo install --locked --path crates/hoocode-code-main --bin hoocode
52
95
  ```
53
96
 
54
- Plain cargo still works and installs the binary as `hoocode`:
55
- `cargo install --path crates/hoocode-code-main --bin hoocode`.
97
+ Or run `scripts/install.sh`, which builds a release binary and installs it as
98
+ `hoocode` and `hoo` into `~/.hoocode/bin` (if the install script was used before) or
99
+ `~/.local/bin`. `--prefix DIR` picks another directory.
56
100
 
57
- ### Pre-built binaries
101
+ hoocode is not on crates.io or Homebrew.
58
102
 
59
- Download `hoocode-<target>.tar.gz` from the
60
- [GitHub Releases](https://github.com/kolisachint/hoocode/releases) page and check it
61
- against `SHA256SUMS`. It holds the `hoocode` binary; put it on your `PATH`. Linux builds are static (musl) and run on any distro.
103
+ **Updating.** `hoocode update` prints the right update command for how you installed it.
62
104
 
63
- ## Usage
105
+ ## Quick start
64
106
 
65
107
  ```bash
66
- # Single-shot print mode (text or JSON)
67
- hoocode -p "Explain this codebase"
68
- hoocode -p --mode json "Explain this codebase"
108
+ export ANTHROPIC_API_KEY=... # or any provider key, see `hoocode --help`
109
+ cd your-project
110
+ hoocode # full-screen interactive session
111
+ ```
69
112
 
70
- # Interactive TUI mode
71
- hoocode
113
+ No API key? Start `hoocode` and run `/login` to sign in with a subscription instead.
72
114
 
73
- # JSON-RPC server mode
74
- hoocode --mode rpc
115
+ A few things to try in the interactive session:
75
116
 
76
- # Subagent mode (used internally by the Agent tool)
77
- hoocode --mode subagent --task-id <id>
78
- ```
117
+ | Type | What it does |
118
+ |---|---|
119
+ | `/model` | Pick a model (Ctrl+P cycles through your favourites) |
120
+ | `/mode` | Switch between ask, plan, build and debug |
121
+ | `/resume` | Reopen an earlier session in this folder |
122
+ | `@path/to/file` | Attach a file to your message |
123
+ | `/hotkeys` | Show the keyboard shortcuts |
124
+ | `/settings` | Change settings |
79
125
 
80
- ## Development
126
+ One-shot and scripted use:
81
127
 
82
128
  ```bash
83
- # Build the entire workspace
84
- cargo build
85
-
86
- # Run checks for all crates
87
- cargo check --workspace
88
-
89
- # Run all tests (CI uses nextest; `cargo test --workspace` works too)
90
- cargo nextest run --workspace
129
+ hoocode -p "Summarize this repo" # print the answer and exit
130
+ hoocode -p --mode json "List the TODOs in src/" # JSON event stream
131
+ hoocode --model anthropic/claude-sonnet-4-5 "Review the last commit"
132
+ hoocode --continue "And now fix the first one" # continue the last session
133
+ hoocode --tools Read,CodeSearch -p "Review src/" # read-only run
134
+ hoocode --mode rpc # JSON-RPC over stdin/stdout
91
135
  ```
92
136
 
93
- ### Releases
94
-
95
- Label a PR `rust:patch`, `rust:minor` or `rust:major`; merging it runs the release:
96
- CI gates (parallel) → version bump, tag and GitHub release → binaries for 4 targets in
97
- parallel, each uploaded as soon as it is built. Optional labels: `release:skip-gates`
98
- (skip the gates, the PR's CI already passed) and `release:crates` (also publish to
99
- crates.io, off by default). Manual runs: Actions → Release.
100
-
101
- ## Migration status (paused 2026-10-01, ready to use)
102
-
103
- The port of hoocode **v0.6.0** (commit `2223437c`) is paused, and `hoocode` is usable as a
104
- daily coding agent. Phases 7, 8 and 11 are complete. Phase 10 is complete apart from the
105
- deferred items listed below. Every remaining task is **deferred** by user decision; none is
106
- in progress. Status per task: `python3 archive/migration/ledger.py status`.
107
-
108
- What works (the pinned hoocode behavior, checked against hoocode itself):
109
-
110
- - **Modes:** interactive TUI, print mode (`-p`, text and `--mode json`), and `--mode rpc`
111
- (with a Rust `RpcClient`).
112
- - **Providers:** every catalog provider, plus OAuth logins (`/login`) and `models.json`.
113
- - **Sessions:** AgentSession with compaction, `/new`, `/resume`, `/fork`, `/tree`,
114
- `--continue`, `--session`, and `/export <file>.jsonl`.
115
- - **Tools:** Read, Shell, Edit, Write, lexical CodeSearch, TodoWrite, AskUserQuestion, and the
116
- Yes/No/Always permission prompt.
117
- - **Agent modes:** ask/plan/build/debug (`/mode`, `/plan`, `/grill`, `/approve`, alt+a).
118
- - **Subagents:** the Agent/AgentOutput tools, the task panel, and the subagent roster.
119
- - **Resources:** skills, prompt templates and slash commands, AGENTS.md/CLAUDE.md context
120
- files, themes, settings (`/settings`) and keybindings.
121
-
122
- Deferred (not available yet, even though `--help` still lists some of them):
123
-
124
- | Area | Ledger task |
125
- |---|---|
126
- | MCP servers (`mcp.json`, stdio/HTTP/SSE, OAuth) | 9.1, 10.11 |
127
- | `WebFetch` / `WebSearch` (`--enable-webtools`) | 10.2e |
128
- | Plugins and marketplace (`--enable-plugintools`) | 12.1 |
129
- | `hoocode install/remove/update/list` package manager | 12.2 |
130
- | Code extensions (`-e`, extension flags) | 12.3 |
131
- | Semantic and hybrid search (`embsearch`). Search is lexical-only. | 12.4 |
132
- | `/loop`, `/goal` autonomous loop, cron/scheduler | 12.5 |
133
- | Warm subagent pool (`--warm-subagents`) | 12.6 |
134
- | HTML export and `/share`, `/learn`, canvas, `--team`, voice, telemetry, version check | 12.7 |
135
-
136
- Known parity gaps: tasks 10.2a/b/c/d/f/g, 10.4c and 10.5 pass Level 1 but not Level 2. The
137
- default-bundle system prompt in hoocode also advertises the DocSearch self-knowledge tool
138
- from 12.4, so model requests differ in that one block.
139
-
140
- The plan and its rationale are in
141
- [`archive/docs/ts-to-rust-migration.md`](archive/docs/ts-to-rust-migration.md)
142
- (§0 status, §9 phases), and the handoff log is in `archive/migration/PROGRESS.md`. To resume, take a
143
- deferred task out of `deferred` and say "continue migration" (see `CLAUDE.md`).
144
-
145
- ## Quick start
137
+ Plugins add skills, subagents and MCP servers. Add a git marketplace, then install
138
+ from it, from the shell or with `/plugin` in a session:
146
139
 
147
140
  ```bash
148
- cargo install --path crates/hoocode-code-main --bin hoocode # puts `hoocode` on PATH
149
- export ANTHROPIC_API_KEY=... # or any provider key from `hoocode --help`, or /login
150
- hoocode # interactive TUI
151
- hoocode -p "Summarize this repo" # one-shot
141
+ hoocode plugin marketplace add <git-url-or-owner/repo>
142
+ hoocode install <plugin>@<marketplace> # --scope project for this repo only
143
+ hoocode list
152
144
  ```
153
145
 
154
- - Config, auth, sessions and settings live in `~/.hoocode` (override with
155
- `HOOCODE_CODING_AGENT_DIR`). Project overrides go in `./.hoocode/`.
156
- Data from the pre-1.2 home and project folders is merged in once, with backups
157
- (`hoocode migrate --dry-run` shows what would change).
158
- - The settings, `models.json`, `auth.json`, session JSONL and `hoo-config.json` formats match
159
- hoocode's, so an existing hoocode setup can be copied over.
160
-
161
- ## Publishing
146
+ `hoocode --help` lists every flag and the provider environment variables;
147
+ `hoocode --list-models [search]` lists the models it knows.
162
148
 
163
- Publishing is driven from GitHub Actions:
149
+ ## Configuration
164
150
 
165
- - `Reserve crates.io names` — one-off workflow that publishes `0.0.1` placeholder crates.
166
- - `Release` — bump, build, publish, and create a GitHub release.
167
- - `Merge Release` — auto-releases PRs labeled `rust:patch`, `rust:minor`, or `rust:major`.
168
- - `Build binaries` — cross-compiles the `hoocode` binary for Linux, macOS (Intel/Apple Silicon), and Windows.
151
+ Everything hoocode keeps lives in **`~/.hoocode`**. Set `HOOCODE_CODING_AGENT_DIR` to
152
+ move it.
169
153
 
170
- Crates marked with `[package.metadata.hoocode] publish = true` are included in automated releases.
154
+ | File or folder | What it holds |
155
+ |---|---|
156
+ | `~/.hoocode/settings.json` | Global settings (`/settings` edits it) |
157
+ | `.hoocode/settings.json` | Per-project settings, merged over the global ones |
158
+ | `~/.hoocode/auth.json` | Logins and keys saved by `/login` |
159
+ | `~/.hoocode/models.json` | Your own providers and models (for example a local OpenAI-compatible server) |
160
+ | `~/.hoocode/hoo-config.json` | Agent modes and tool approval rules (`auto_allow`) |
161
+ | `~/.hoocode/skills/`, `.hoocode/skills/` | Skills, global and per project |
162
+ | `~/.hoocode/themes/` | Custom themes |
163
+ | `~/.hoocode/sessions/` | Saved sessions, one JSONL file each, in a folder per project (`HOOCODE_CODING_AGENT_SESSION_DIR` or `--session-dir` moves them) |
164
+ | `~/.agents/mcp.json`, `.agents/mcp.json` | MCP servers, global and per project (`/mcp` shows their state) |
165
+ | `~/.agents/plugins/`, `.agents/plugins/` | Plugins, user and per project (`hoocode install`, `hoocode list`, or `/plugin` in a session) |
166
+ | `AGENTS.md` or `CLAUDE.md` | Project instructions, read from the working folder and its parents |
167
+
168
+ Because sessions are saved as files, you can resume, fork or export
169
+ them (`/export <file>.jsonl`). `--no-session` keeps a run ephemeral, and `--offline`
170
+ turns off startup network calls such as the version check.
171
+
172
+ ## Documentation
173
+
174
+ - [`docs/maps/ui.md`](docs/maps/ui.md): the screen, pickers, slash commands and keys,
175
+ and where each lives in the code
176
+ - [`docs/maps/packages.md`](docs/maps/packages.md): every crate in the workspace and
177
+ what it does
178
+ - [`docs/design/`](docs/design/README.md): design notes and the plan for what is built next
179
+ - [`docs/design/distribution.md`](docs/design/distribution.md): how releases reach users
180
+ - [`CHANGELOG.md`](CHANGELOG.md): what changed (also `/changelog` inside hoocode)
181
+
182
+ ## Contributing
183
+
184
+ Bug reports, ideas and pull requests are welcome. Start with
185
+ [CONTRIBUTING.md](CONTRIBUTING.md): it covers the dev loop (fmt, clippy, nextest),
186
+ where tests go and how releases work. Please read the
187
+ [code of conduct](CODE_OF_CONDUCT.md), and report security problems privately as
188
+ described in [SECURITY.md](SECURITY.md).
189
+
190
+ If hoocode is useful to you, a star on the repo helps other people find it.
191
+
192
+ ## Credits
193
+
194
+ hoocode began as a fork of [`pi-mono`](https://github.com/badlogic/pi-mono) by
195
+ Mario Zechner, which is MIT-licensed. Its copyright notice is kept in [LICENSE](LICENSE).
196
+ Thanks to Mario and the upstream contributors.
197
+
198
+ ## License
199
+
200
+ MIT, see [LICENSE](LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolisachint/hoocode",
3
- "version": "0.1.41",
3
+ "version": "0.2.1",
4
4
  "description": "HooCode, the terminal coding agent (Rust build)",
5
5
  "bin": {
6
6
  "hoocode": "bin/hoocode.js",
@@ -13,10 +13,10 @@
13
13
  "node": ">=18"
14
14
  },
15
15
  "optionalDependencies": {
16
- "@kolisachint/hoocode-darwin-arm64": "0.1.41",
17
- "@kolisachint/hoocode-darwin-x64": "0.1.41",
18
- "@kolisachint/hoocode-linux-arm64": "0.1.41",
19
- "@kolisachint/hoocode-linux-x64": "0.1.41"
16
+ "@kolisachint/hoocode-darwin-arm64": "0.2.1",
17
+ "@kolisachint/hoocode-darwin-x64": "0.2.1",
18
+ "@kolisachint/hoocode-linux-arm64": "0.2.1",
19
+ "@kolisachint/hoocode-linux-x64": "0.2.1"
20
20
  },
21
21
  "license": "MIT",
22
22
  "repository": {