CLI Reference

CLI Reference

Scaffold projects and export static HTML from the terminal.

Updated: 2026-07-26

karui create

Scaffolds a new project. The package installs a karui binary, so it is available as npx karui inside a project and npx @rigbyhost/karui from anywhere.

bash
karui create <project-name> [options]

  --pm <npm|pnpm|yarn|bun>   package manager for install
  --no-install               skip dependency install
  --force                    allow a non-empty target directory

karui prerender

Renders a built site to static HTML. Run it after npm run build.

bash
karui prerender [options]

  --out <dir>          output directory (default dist/static)
  --root <dir>         project root (default cwd)
  --path <url>         extra path to render (repeatable)
  --not-found <url>    render this path to 404.html
  --only-paths         render only --path entries
  --template <file>    html template (default index.html)
  --app <module>       app entry (default /src/app.tsx)
  --client-dist <dir>  client build dir (default dist/client)
  --server-dist <dir>  server build dir (default dist/server)