Guide for coding agents working on Hono CLI.
Hono CLI (hono) is a command-line tool for Hono.
We are redesigning it to be AI-first: JSON output by default, commands
made for coding agents, not humans.
pnpm install— install dependenciespnpm run build— build (tsdown)pnpm run watch— build with auto-rebuildpnpm run test— run tests (Vitest)pnpm run format:fix && pnpm run lint:fix— fix format and lint
Runtime: Node.js 22+. Package manager: pnpm.
- Each command is in
src/commands/{command}/index.ts - Split testable logic into small modules (e.g.
builtin-map.ts) - Shared code is in
src/utils/
- TypeScript. No
any - Keep it simple. The simplest code that works is the best
- A behavior change needs a test that fails without the change
- A feature change needs a README update in the same PR
- Write short, simple English in docs, comments, commits, and PRs
- Follow patterns from other https://github.com/honojs projects
-
Branch from latest
main:<type>/<short-slug>.<type>isfeat/fix/chore/docs/refactor -
Implement
-
Run the quality gates. All must pass:
pnpm run format:fix && pnpm run lint:fix pnpm run test pnpm run build
-
Commit with conventional commits:
<type>(<scope>): <description>. Example:feat(request): add --runtime option -
Open a PR against
main. Keep the body short:What and why, in a few sentences.
No fixed section labels. Write it like a human note. Add notes the checklist does not cover as plain sentences. Use bullets only when there are several items.
Add
Closes #<n>only if an issue exists.End the body with the checklist from
.github/pull_request_template.md. Check the items you did. -
Self-review the diff with the checklist below
No AI attribution. Do not add Co-Authored-By, session links, or
"Generated with ..." to commits or PR bodies.
One PR = one concern. Do not force-push a branch under review.
Run the quality gates first. Then check:
- Correctness — does it do what was asked? Check edge cases
- Tests — does a behavior change have a test that fails without it?
- Type safety — no new
any, including tests - Simplicity — flag over-engineering
- Docs — README updated?
- Breaking changes — call them out
- Conventions — command structure, commit style, short PR body, no AI attribution
Verdict: approve / request changes / needs human decision.
Rank findings by severity: blocker / bug / risk / nit.
- On
main:pnpm run release(np --no-publish— bumps the version, tags, pushes, and creates a GitHub release). It is interactive, so a human runs it in a terminal - The tag push triggers the
releaseworkflow, which stages the package on npm with staged publishing - A maintainer approves the staged package on npmjs.com (needs 2FA)
Need Hono details? Fetch https://hono.dev/llms.txt or a page under
https://hono.dev/docs/....
Keep this file simple, short, and correct. If reality changes, update this file in the same PR.