364 GitHub stars and counting — honojs/cli is a TypeScript project TopGit is tracking across repositories on the platform. Command-line tool for Hono, made for AI coding agents
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
It's not a create-* command, not only for dev, build, and deploy, but also not a Vite wrapper. Built on an entirely new concept.
Hono CLI will give you the hono command. For Humans, you can use sub-commands specialized for Hono for simple usages. For AI, providing sub-commands to build your Hono application efficiently with AI coding.
Installation
npm install -g @hono/cli
Usage
# Show help
hono --help
# Display documentation
hono docs
# Search documentation
hono search middleware
# Send request to Hono app
hono request
# Start server
hono serve
# Generate an optimized Hono app
hono optimize
Commands
docs [path] - Display Hono documentation
search <query> - Search Hono documentation
request [file] - Send request to Hono app using app.request()
serve [entry] - Start server for Hono app
optimize [entry] - Generate an optimized Hono app
docs
Display Hono documentation content directly in your terminal.
Start a server for your Hono application. This is a simple server specialized for Hono applications with built-in TypeScript and JSX support.
hono serve [entry] [options]
Arguments:
entry - Entry file for your Hono app (TypeScript/JSX supported, optional)
Options:
-p, --port <port> - Port number (default: 7070)
--show-routes - Show registered routes
--use <middleware> - Use middleware (can be used multiple times)
-e, --external <package> - Mark package as external (can be used multiple times)
Examples:
# Start server with default empty app (no entry file needed)
hono serve
# Start server on specific port
hono serve -p 3000 src/app.ts
# Start server with specific entry file
hono serve src/app.ts
# Start server and show routes
hono serve --show-routes src/app.ts
# Start server with middleware
hono serve --use 'cors()' src/app.ts
# Start server with multiple middleware
hono serve --use 'cors()' --use 'logger()' src/app.ts
# Start server with authentication and static file serving
hono serve \
--use 'basicAuth({ username: "foo", password: "bar" })' \
--use "serveStatic({ root: './' })"
# Start server with external packages (useful for Node.js native modules)
hono serve -e pg -e prisma src/app.ts
optimize
Generate an optimized Hono class and export bundled file.
This command automatically applies the following optimizations to reduce bundle size:
Request body API removal: Removes request body APIs (c.req.json(), c.req.formData(), etc.) when your application only uses GET, HEAD, or OPTIONS methods
Context response API removal: Removes unused response utility APIs (c.body(), c.json(), c.text(), c.html(), c.redirect()) from Context object
Hono API removal: Removes unused Hono methods (route, mount, fire) that are only used during application initialization
hono optimize [entry] [options]
Arguments:
entry - Entry file for your Hono app (TypeScript/JSX supported, optional)
Options:
-o, --outfile <outfile> - Output file
-m, --minify - minify output file
-t, --target [target] - environment target
--no-request-body-api-removal - Disable request body API removal optimization
--no-context-response-api-removal - Disable response utility API removal from Context object
--no-hono-api-removal - Disable Hono API removal optimization
Examples:
# Generate an optimized Hono class and export bundled file to dist/index.js
hono optimize
# Specify entry file and output file
hono optimize -o dist/app.js src/app.ts
# Export bundled file with minification
hono optimize -m
# Specify environment target
hono optimize -t es2024
# Disable specific optimizations
hono optimize -m --no-request-body-api-removal
hono optimize -m --no-context-response-api-removal
hono optimize -m --no-hono-api-removal
Tips
Using Hono CLI with AI Code Agents
When working with AI code agents like Claude Code, you can configure them to use the hono CLI for efficient documentation access and testing. Add the following to your project's CLAUDE.md or similar configuration:
## Hono Development
Use the `hono` CLI for efficient development. View all commands with `hono --help`.
### Core Commands
- **`hono docs [path]`** - Browse Hono documentation
- **`hono search <query>`** - Search documentation
- **`hono request [file]`** - Test app requests without starting a server
### Quick Examples
```bash
# Search for topics
hono search middleware
hono search "getting started"
# View documentation
hono docs /docs/api/context
hono docs /docs/guides/middleware
# Test your app
hono request -P /api/users src/index.ts
hono request -P /api/users -X POST -d '{"name":"Alice"}' src/index.ts
```
### Workflow
1. Search documentation: `hono search <query>`
2. Read relevant docs: `hono docs [path]`
3. Test implementation: `hono request [file]`
Pipeline Integration with jq
The search command outputs JSON by default, making it easy to pipe results to other commands:
# Search and view documentation in one command
hono search "middleware" | jq '.results[0].path' | hono docs
TopGit's last sync did not record any GitHub topics for honojs/cli. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on honojs/cli?
The most recent commit recorded on honojs/cli was 22 days ago, based on the GitHub push timestamp. The repository has 11 forks — one of the better signals of community interest.
How many stars does honojs/cli have?
honojs/cli has 364 GitHub stars — refresh the page for the live number, or check github.com/honojs/cli. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What is honojs/cli?
honojs/cli (honojs/cli) is a TypeScript project on GitHub. From the project's own README: Command-line tool for Hono, made for AI coding agents
What language is honojs/cli written in?
honojs/cli is written primarily in TypeScript. GitHub's language field is based on the largest share of bytes in the default branch.
Read full README in the tab above.
Curious whether cli is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about cli.