hono
Use when building APIs or web servers with Hono — routing, middleware, edge deployment, or multi-runtime support. Also use when deploying to Cloudflare Workers, Vercel Edge, Bun, Deno, or Node.js with a lightweight framework.
| Model | Source |
|---|---|
| sonnet | pack: backend |
Full Reference
┏━ 🔧 hono ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ Use when building APIs or web servers with Hon… ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
Hono is a lightweight (~14KB), ultra-fast web framework built on Web Standards. One codebase runs on Cloudflare Workers, Bun, Deno, Node.js, Vercel Edge, Netlify, and AWS Lambda via runtime adapters.
Quick Reference
Section titled “Quick Reference”| Item | Value |
|---|---|
| Version | 4.12.0 (latest) |
| Install | npm create hono@latest |
| Size | less than 14KB minified |
| Node.js min | 18.14.1+ |
| Runtime detection | c.env.VAR in Workers, process.env in Node/Bun |
| Key imports | hono, hono/cors, hono/jwt, hono/validator, @hono/zod-validator, hono/client |
Runtime Adapters
Section titled “Runtime Adapters”| Runtime | Adapter | Dev Command |
|---|---|---|
| Cloudflare Workers | built-in | wrangler dev |
| Node.js | @hono/node-server | npm run dev |
| Bun | built-in | bun run dev |
| Deno | built-in | deno task dev |
| Vercel Edge | built-in | vercel dev |
| AWS Lambda | hono/aws-lambda | — |
Reference Index
Section titled “Reference Index”| I want to… | File |
|---|---|
| Set up a Hono server for any runtime | reference/setup.md |
| Define routes, params, and handlers | reference/routing.md |
| Add CORS, JWT, logger, and custom middleware | reference/middleware.md |
| Validate request bodies, queries, and params | reference/validation.md |
| Use the type-safe RPC client (hc) | reference/rpc-client.md |
| Handle errors globally with onError | reference/error-handling.md |
| Write tests for Hono apps | reference/testing.md |
| Deploy to Cloudflare, Node.js, Bun, or Vercel | reference/deployment.md |
Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.