CLI#
One command gets you from nothing to a running hono-preact app:
create-hono-preact scaffolds the project, installs dependencies, and
initializes a git repo. It also has an add-agents subcommand for dropping
framework guidance into a project you set up manually.
Create a new app#
pnpm create hono-preact my-app
This scaffolds my-app/, installs dependencies, and initializes a git repo. Then:
cd my-app
pnpm dev
Options#
| Flag | Default | Description |
|---|---|---|
--adapter=<cloudflare|node> | cloudflare | Target runtime. cloudflare for Workers, node for a Node server. |
--no-install | install runs | Skip the dependency install step. |
--no-git | git init runs | Skip initializing a git repository. |
--version, -v | Print the CLI version. | |
--help, -h | Print usage. |
Add agent guidance to an existing app#
If you added hono-preact to a project you did not scaffold (for example with
pnpm add hono-preact), drop in the guidance an AI coding agent reads:
npx create-hono-preact add-agents
It writes AGENTS.md (framework conventions for any AI coding agent), a one-line CLAUDE.md pointer, an agents/skills/ directory of step-by-step recipes (add a page, a loader, an action, a guard), and agents/llms-full.txt (the full documentation bundled for offline reference). Existing files are left untouched unless you pass --force.
| Flag | Default | Description |
|---|---|---|
--force | off | Overwrite existing files (AGENTS.md, CLAUDE.md, agents/skills/*.md, agents/llms-full.txt). |
See Quick Start for the full walkthrough.