Open Form

Overview

One open-form CLI to scaffold, develop, check, build and serve forms, and the package.json scripts every workspace gets.

Open Form ships a single binary, open-form, in the @open-form-build/core package. Scaffold a workspace with npm create open-form@latest; every other command runs inside that workspace.

init sets up these scripts in package.json:

package.json
{
  "scripts": {
    "dev": "open-form dev",
    "build": "open-form build",
    "start": "open-form start",
    "typecheck": "tsc --noEmit",
    "sync:skills": "open-form sync:skills"
  }
}

So day to day you run the dev, build and start scripts, and the open-form binary for the rest: npx open-form <command>, pnpm exec open-form <command>, yarn open-form <command> or bunx open-form <command>. Commands in these docs come in a tab for each package manager.

Commands

CommandWhat it does
init [dir]Create a new workspace.
devStart the dev server with Studio.
buildBuild for production.
startServe the production build: forms, API, storage.
check [id]Load forms like the server does and print their schema, or the error.
create <id>Create a new form from the starter, with its own theme/index.ts, optionally from a theme's tokens (--theme).
delete <id>Delete a form, its files and every response.
listList forms and their response counts.
responses export <formId>Export responses as CSV, Excel or JSON.
db statusShow which database stores responses, and check that it answers.
db copyCopy the SQLite database into Postgres, response numbers included.
theme list|check|add|fontList reference themes, check contrast, add a starter to themes/, download a Google Fonts family.
comments [id]List review comments left in Studio.
sync:skillsUpdate the agent skills in .agents/skills/.

open-form --help lists them, open-form <command> --help shows a command's flags, and open-form -v prints the version.

Every command except init loads .env from the folder you run it in (your workspace) when there is one, with Node's process.loadEnvFile. Variables already set in the environment win.

Requirements

Node.js 22.13 or later. Storage uses the built-in node:sqlite, so there's no database to install. To use Postgres instead, add pg.

On this page