TopGit theo dõi honojs/cli trên GitHub, đã đạt 366 sao. Command-line tool for Hono, made for AI coding agents
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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
honojs/cli có 366 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/honojs/cli. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
honojs/cli có tag gì không?
Bản đồng bộ chưa ghi nhận topic GitHub nào cho honojs/cli. GitHub topics hiển thị ở thanh bên phải trang repo — đó là nơi đáng kiểm tra nhất.
honojs/cli còn đang phát triển không?
Commit gần nhất trên honojs/cli là 13 ngày trước (theo timestamp GitHub). Repo có 12 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
honojs/cli là gì?
honojs/cli (honojs/cli) là dự án TypeScript trên GitHub. Theo mô tả gốc: Command-line tool for Hono, made for AI coding agents
honojs/cli viết bằng ngôn ngữ gì?
honojs/cli chủ yếu viết bằng TypeScript. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về cli?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về cli.