framekit CLI
Run framekit from the consumer project root. Every command uses process.cwd() as its project root. The executable accepts these commands:
framekit generateframekit checkframekit devframekit buildframekit startframekit browser install [--with-deps]Standard commands reject extra arguments. The browser command accepts only the optional --with-deps flag. The CLI has no --help or --version command.
framekit generate
Section titled “framekit generate”Scans src/templates and writes the project-local generated modules under src/generated/framekit/:
templates.tsbrands.tsstudio-client.tsxrender-client.tsx
It also synchronizes discovered template assets under public/framekit/templates/. The command requires at least one discovered template.
pnpm framekit generateframekit check
Section titled “framekit check”Runs generate first, then validates every discovered template definition and every declared content variant. It uses a temporary checker under .framekit/, removes that temporary directory after the check, and reports structured validation errors. It is not a TypeScript typecheck and does not render PNG output.
pnpm framekit checkframekit dev
Section titled “framekit dev”Runs generate before starting the Next.js development server with Turbopack. It watches paths under src/templates and src/brand and regenerates the generated modules when they change. It does not require a production build.
pnpm framekit devThe development server uses FRAMEKIT_HOST, then HOST, then localhost for its hostname, and PORT with a default of 3000.
framekit build
Section titled “framekit build”Runs check first. When validation succeeds, it runs next build and prepares the standalone output under .framekit/next/, including the public and Next static assets needed by that server. A separate build is not required before this command.
pnpm framekit buildframekit start
Section titled “framekit start”Starts the existing production standalone server. It does not run generate, check, or next build; run framekit build successfully first.
pnpm framekit startThe launched standalone server inherits its environment. Next.js reads production HOSTNAME and PORT; FRAMEKIT_HOST and HOST are not mapped to HOSTNAME by start.
framekit browser install
Section titled “framekit browser install”Installs the Chromium headless shell used by server-side rendering. --with-deps additionally asks Playwright to install system dependencies, which may require root or equivalent package privileges on Linux.
pnpm framekit browser installpnpm framekit browser install --with-depsThe command honors PLAYWRIGHT_BROWSERS_PATH. The other framekit commands do not download browser binaries.
See create a template, Use Studio, deployment runtime, and the server package API.