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:
{
"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
| Command | What it does |
|---|---|
init [dir] | Create a new workspace. |
dev | Start the dev server with Studio. |
build | Build for production. |
start | Serve 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. |
list | List forms and their response counts. |
responses export <formId> | Export responses as CSV, Excel or JSON. |
db status | Show which database stores responses, and check that it answers. |
db copy | Copy the SQLite database into Postgres, response numbers included. |
theme list|check|add|font | List reference themes, check contrast, add a starter to themes/, download a Google Fonts family. |
comments [id] | List review comments left in Studio. |
sync:skills | Update 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.
/apply-comments
The /apply-comments skill turns the notes you leave on a form in Studio's Edit mode into code edits, then removes each marker it applied.
open-form init
Scaffold a forms workspace with npm create open-form: forms, themes and agent skills, installed with the package manager you ran it with.