create-hono-inertia
v0.3.1
Published
Scaffold a Hono + Inertia + hono/jsx project (Cloudflare Workers, SSR + hydration)
Maintainers
Readme
create-hono-inertia
Scaffold a Hono + Inertia.js project with hono/jsx, SSR + hydration, and Cloudflare Workers ready out of the box.
Usage
npm create hono-inertia@latest
# or
pnpm create hono-inertia
# or
yarn create hono-inertia
# or
bun create hono-inertiaYou will be prompted for:
- Project name (or pass it as an argument:
pnpm create hono-inertia my-app) - Add Tailwind CSS? (v4 with
@tailwindcss/vite) - Add import alias? (
@/*→./src/*) - Install dependencies? (auto-detects npm / pnpm / yarn / bun)
- Initialize a git repository?
Then:
cd my-app
pnpm devNon-interactive
Pass --yes (or -y) to accept all defaults. Combine with --skip-* flags to opt out:
pnpm create hono-inertia my-app --yes --skip-tailwindSupported flags: --yes, --skip-install, --skip-git, --skip-tailwind, --skip-alias.
What you get
A minimal Hono + Inertia template (no opinions about folder structure, layouts, or feature splits — extend it however you like):
- Server: Hono on Cloudflare Workers, with
@hono/inertiamiddleware - Client:
hono/jsxvia@ts-76/inertia-hono-jsxadapter - SSR + hydration: server-side rendering with browser-side hydration
- Type-safe pages: auto-generated
pages.gen.tsfor typed Inertia page props - Build: Vite with the official
@cloudflare/vite-plugin - Optional: Tailwind CSS v4 +
@/*import alias (opt-in via prompt)
Project layout
src/
├── index.tsx # Hono app + routes (your sandbox)
├── inertia.tsx # Inertia middleware + rootView + ssrRender (setup)
├── client.tsx # hydration entry (rarely touched)
├── pages.gen.ts # auto-generated by @hono/inertia/vite
├── Pages/Home.tsx # add Inertia pages here
└── style.cssNext steps
- Add more pages under
src/Pages/ - Add routes in
src/index.tsxwithc.Inertia.render('PageName', props) - Deploy with
pnpm deploy(useswrangler deploy)
License
MIT
