← ClaudeAtlas

honolisted

Use when building Hono web applications or when the user asks about Hono APIs, routing, middleware, JSX, validation, testing, or streaming. TRIGGER when code imports from 'hono' or 'hono/*', or user mentions Hono. Use `npx hono request` to test endpoints.
louisbrulenaudet/monorepo-template · ★ 19 · Web & Frontend · score 76
Install: claude install-skill louisbrulenaudet/monorepo-template
# Hono Skill Build Hono web applications. This skill provides inline API knowledge for AI. Use `npx hono request` to test endpoints. If the `hono-docs` MCP server is configured, prefer its tools for the latest documentation over the inline reference. ## Hono CLI Usage ### Request Testing Test endpoints without starting an HTTP server. Uses `app.request()` internally. ```bash # GET request npx hono request [file] -P /path # POST request with JSON body npx hono request [file] -X POST -P /api/users -d '{"name": "test"}' ``` **Note:** Do not pass credentials directly in CLI arguments. Use environment variables for sensitive values. `hono request` does not support Cloudflare Workers bindings (KV, D1, R2, etc.). When bindings are required, use `workers-fetch` instead: ```bash npx workers-fetch /path npx workers-fetch -X POST -H "Content-Type:application/json" -d '{"name":"test"}' /api/users ``` --- ## Hono API Reference ### App Constructor ```ts import { Hono } from 'hono' const app = new Hono() // With TypeScript generics type Env = { Bindings: { DATABASE: D1Database; KV: KVNamespace } Variables: { user: User } } const app = new Hono<Env>() ``` ### Routing Methods ```ts app.get('/path', handler) app.post('/path', handler) app.put('/path', handler) app.delete('/path', handler) app.patch('/path', handler) app.options('/path', handler) app.all('/path', handler) // all HTTP methods app.on('PURGE', '/path', handler) // custom method app.on(['PUT', 'DELETE'], '/path'