Development
See AGENTS.md for additional guidelines.
Setup
git clone https://github.com/kolisachint/hoocode
cd hoocode
npm install
npm run build
Run from source:
/path/to/hoocode/hoocode-test.sh
The script can be run from any directory. HooCode keeps the caller’s current working directory.
Forking / Rebranding
Configure via package.json:
{
"piConfig": {
"name": "hoocode",
"configDir": ".hoocode"
}
}
Change name, configDir, and bin field for your fork. Affects CLI banner, config paths, and environment variable names.
Path Resolution
Three execution modes: npm install, standalone binary, tsx from source.
Always use src/config.ts for package assets:
import { getPackageDir, getThemeDir } from "./config.js";
Never use __dirname directly for package assets.
Debug Command
/debug (hidden) writes to ~/.hoocode/hoocode-debug.log:
- Rendered TUI lines with ANSI codes
- Last messages sent to the LLM
Testing
./test.sh # every package (LLM tests skip without API keys)
./test.sh coding-agent # one package
./test.sh coding-agent -- test/tips.test.ts # one file
Run ./test.sh from the repository root, not bun run test — the root test
script shells out to npm run test --workspaces, which under bun re-invokes
itself until it runs out of memory. ./test.sh builds ai, agent and tui
first, because the other packages resolve them by package name through dist/.
Project Structure
packages/
ai/ # LLM provider abstraction
agent/ # Agent loop and message types
tui/ # Terminal UI components
coding-agent/ # CLI and interactive mode