# Hono — Ultra-Fast Web Framework for Edge & AI APIs > Lightweight TypeScript web framework that runs on Cloudflare Workers, Deno, Bun, Vercel, and Node.js. 14KB, zero dependencies, 3x faster than Express. Perfect for AI API backends. 22,000+ stars. ## Install Save as a script file and run: ## Quick Use ```bash npm create hono@latest my-api cd my-api && npm run dev ``` ```typescript import { Hono } from "hono"; const app = new Hono(); app.get("/", (c) => c.text("Hello Hono!")); app.post("/api/chat", async (c) => { const { message } = await c.req.json(); const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "x-api-key": c.env.ANTHROPIC_API_KEY, "content-type": "application/json" }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", messages: [{ role: "user", content: message }] }), }); return c.json(await response.json()); }); export default app; ``` --- ## Intro Hono is an ultra-lightweight TypeScript web framework with 22,000+ GitHub stars that runs everywhere — Cloudflare Workers, Deno, Bun, Vercel Edge, AWS Lambda, and Node.js. At just 14KB with zero dependencies, it is 3x faster than Express and designed for edge computing where every millisecond and kilobyte matters. Perfect for building AI API backends, webhook handlers, and MCP server wrappers. Best for TypeScript developers building fast, portable APIs. Works with: any JavaScript runtime. Setup time: under 1 minute. --- ## Why Hono ### Performance | Framework | Requests/sec | Size | |-----------|-------------|------| | Hono | 130,000 | 14KB | | Express | 45,000 | 200KB+ | | Fastify | 75,000 | 100KB+ | | Koa | 50,000 | 60KB+ | ### Multi-Runtime Support ```typescript // Same code runs everywhere: // - Cloudflare Workers // - Deno // - Bun // - Node.js // - Vercel Edge Functions // - AWS Lambda // - Netlify Edge ``` ### Middleware Ecosystem ```typescript import { cors } from "hono/cors"; import { jwt } from "hono/jwt"; import { logger } from "hono/logger"; import { cache } from "hono/cache"; import { compress } from "hono/compress"; app.use("*", cors()); app.use("*", logger()); app.use("/api/*", jwt({ secret: "my-secret" })); ``` ### AI API Pattern ```typescript import { Hono } from "hono"; import { stream } from "hono/streaming"; const app = new Hono(); app.post("/api/stream", async (c) => { return stream(c, async (stream) => { const response = await fetch("https://api.anthropic.com/v1/messages", { method: "POST", headers: { "x-api-key": c.env.API_KEY }, body: JSON.stringify({ model: "claude-sonnet-4-20250514", stream: true, messages: [...] }), }); for await (const chunk of response.body) { await stream.write(chunk); } }); }); ``` ### RPC Mode (Type-Safe Client) ```typescript // Server const route = app.get("/api/users/:id", (c) => c.json({ name: "Alice" })); // Client (auto-typed) import { hc } from "hono/client"; const client = hc("http://localhost:3000"); const res = await client.api.users[":id"].$get({ param: { id: "1" } }); ``` ### Key Stats - 22,000+ GitHub stars - 14KB, zero dependencies - 7 runtime targets - 3x faster than Express - Built-in RPC type safety ### FAQ **Q: What is Hono?** A: Hono is an ultra-lightweight TypeScript web framework that runs on every JavaScript runtime — Cloudflare Workers, Deno, Bun, Node.js, and more — at 3x the speed of Express. **Q: Is Hono free?** A: Yes, fully open-source under MIT license. **Q: Can I migrate from Express to Hono?** A: Yes, Hono has similar routing syntax. Most Express middleware patterns have Hono equivalents. --- ## Source & Thanks > Created by [Yusuke Wada](https://github.com/yusukebe). Licensed under MIT. > > [hono](https://github.com/honojs/hono) — ⭐ 22,000+ Thanks for proving web frameworks can be tiny, fast, and universal. --- ## 快速使用 ```bash npm create hono@latest my-api cd my-api && npm run dev ``` --- ## 简介 Hono 是一个超轻量 TypeScript Web 框架,GitHub 22,000+ stars。仅 14KB,零依赖,比 Express 快 3 倍。运行在 Cloudflare Workers、Deno、Bun、Node.js 等 7 个运行时上。适合构建 AI API 后端和边缘函数。 --- ## 来源与感谢 > Created by [Yusuke Wada](https://github.com/yusukebe). Licensed under MIT. > > [hono](https://github.com/honojs/hono) — ⭐ 22,000+ --- Source: https://tokrepo.com/en/workflows/df1d7640-47fd-430f-ac5d-b7b084942e00 Author: Script Depot