CLI Reference

@mmtq/hono-swagger comes with several handy CLI commands:

npx hono-swagger generate

Scans your codebase and outputs the OpenAPI spec according to your config.

npx hono-swagger watch

Runs in the background, watching your TypeScript files for changes and automatically regenerating the docs. Perfect for local development!

npx hono-swagger validate

Checks your generated OpenAPI spec against the official OpenAPI 3 schema to ensure it is perfectly valid.

npx hono-swagger serve --port 8080

Spins up a lightweight static HTTP server specifically for hosting the generated Swagger UI (useful if you don't want to serve it directly through your Hono app).

npx hono-swagger clean

Deletes the generated output directory to ensure a fresh build.

Built with ❤️ for the Hono community