open-form dev
Run the dev server: Studio, every form at /f/<id> with hot reload, skills kept in sync, and what you are looking at shared with your agent.
npm run dev
# or
npx open-form devStarts a Vite dev server on http://localhost:3000 (or the next free port) and
prints Studio's URL and a link for each form:
┃ Studio http://localhost:3000/studio
┃ Form http://localhost:3000/f/contactOnly the first six forms get a link; the rest show as … N more. With --host,
a Network row gives the address for other devices. A Skills row appears
when starting updated the skills, or couldn't.
Run it in your workspace: a folder with open-form.config.ts, or a
package.json that depends on @open-form-build/core. Anywhere else it stops with an error
instead of writing skills and a secret into that folder. dev loads .env from
the workspace when there is one, so OPEN_FORM_ADMIN_PASSWORD and other
variables can live there; variables already set in your shell win. It reads
.env once at start, so restart dev after changing it.
Flags
| Flag | Default | Description |
|---|---|---|
-p, --port <port> | port in config, else 3000 | Port to listen on. |
--host [host] | localhost only | Expose the server on the network, optionally on a specific host. |
--open | off | Open Studio in the browser. |
What you get
- Studio at
/studio— your forms, Preview with Edit mode, Responses, Schema, Settings and Themes. See Studio. - Forms at
/f/<id>, as respondents see them. Submissions are stored for real, in the same databaseopen-form startuses on this machine:.open-form/open-form.dbby default, or Postgres whenOPEN_FORM_DATABASE_URLorstorage.urlis set. - Hot reload — saving a form updates it in the browser, and the server
re-derives its schema, so validation and Responses follow the code without a
restart. Saving
open-form.config.tsrestarts the server with the new config and reloads open pages; if the file has an error, the server keeps running with the previous config. Adding or removing a form reloads Studio, but a form page whose form is still there keeps its answers. A form that imports a file before it exists loads as soon as the file is written. Pressr+ Enter to restart by hand. - Writes to your source — Studio's changes land in your files: text edits
and notes from Edit mode and schedule changes
in a form's Settings in the form's file, translated text in its
locales/*.json(or inline tables), folders informs/.folders.json, and token edits, fonts and added starters from the Themes page inthemes/. Deleting a form removesforms/<id>/and its responses; seeopen-form delete.
Agent integration
- Skills sync — on start,
devcopies the built-in skills from the installed@open-form-build/coreinto.agents/skills/, overwriting any that differ, and syncs again if the package's skills change while it runs. SetOPEN_FORM_SKIP_SKILLS_SYNC=1to turn this off. Seeopen-form sync:skills. current.json— as you move around Studio and form pages,devwrites where you are (form, step, the form's own theme, an open reference theme, Edit-mode selection) tonode_modules/.open-form/current.json, so your agent knows what "this" means. See/current-form.
Admin access
Without a password, Studio and the admin API answer only direct requests from
this machine. Pages served from another origin — another dev server on
localhost, say — are refused, and so are requests through the network
(--host), a tunnel or a reverse proxy that announces itself.
Set OPEN_FORM_ADMIN_PASSWORD (at least 16 characters, not one word or
pattern repeated) to reach Studio from anywhere else. With a password, Studio
requires signing in for every request, including from this machine: a reverse
proxy that adds no X-Forwarded-For (nginx's default proxy_pass) or a raw TCP
tunnel (ssh -R, socat) makes a remote request look local, so never expose
dev without one.
dev ignores OPEN_FORM_TRUST_PROXY. Behind a proxy, only trustProxy in
open-form.config.ts makes it read the client's
address and protocol from forwarded headers.
Reaching the dev server through a proxied domain and getting a blocked-host
error? Add the host to allowedHosts in
open-form.config.ts.