Getting started with AI authoring
Before you start
Install form0-cli on Node.js 22.19.0 or newer. You need either a supported provider credential or a reachable local Ollama model. A schema is optional: without one, AI authoring starts from the canonical empty form.
See Install and update for CLI installation and runtime requirements.
Enter AI mode
Open a known schema directly:
Code
Or compose AI authoring with the interactive preview server:
Code
Starting AI mode does not automatically start a server. An existing server remains active and shows validated drafts immediately.
You can also start both from AI mode, including when the form has not been saved yet:
Code
The server receives the current working schema, including a validated unapplied proposal. In AI
mode, unprefixed input is always a model request; use slash commands such as /serve, /validate,
and /preview for CLI actions.
Authenticate and select a model
List the provider catalog, authenticate, inspect model identifiers, and select one:
Code
Provider and authentication identifiers come directly from Pi. For API-key authentication, the CLI asks for the secret without adding it to the project or schema. See Providers and models for the supported baseline and storage behavior.
Make and review a first change
Describe the desired form behavior, not raw JSON edits:
Code
The agent may ask questions or return diagnostics while it constructs a valid mutation batch. Once a proposal is ready:
Code
Nothing is written until apply is confirmed. Use the workflow guide to understand draft review, revisions, undo, and conflicts.
Start without a schema
Run the command without a path to begin from an empty form:
Code
The first apply asks for a schema path and uses the normal overwrite confirmation if that file already exists. After saving, the temporary conversation identity is reassigned to the canonical schema path.