CLI Reference
Global flags
Section titled “Global flags”All commands accept:
| Flag | Description |
|---|---|
--help | Show help for the command |
--json | Output in machine-readable JSON |
--api-url <url> | Override the API base URL |
--config <path> | Override the config file path |
agentsforms init
Section titled “agentsforms init”Initialize a new AgentsForms project.
agentsforms init [--name <project-name>]| Flag | Description |
|---|---|
--name <project-name> | Project name (default: current directory name) |
Creates agentsforms.config.json and forms/example-form.json.
agentsforms forms
Section titled “agentsforms forms”Manage form definitions.
agentsforms forms validate <path>
Section titled “agentsforms forms validate <path>”Validate a form definition JSON file.
agentsforms forms validate forms/example-form.jsonagentsforms forms validate forms/*.jsonagentsforms forms validate --stdin < forms/example-form.json| Flag | Description |
|---|---|
--stdin | Read the form definition from stdin |
Exit code: 0 on valid, 1 on invalid.
agentsforms forms create <path>
Section titled “agentsforms forms create <path>”Create a form from a validated JSON file.
agentsforms forms create forms/support-intake.jsonagentsforms forms publish <slug|id>
Section titled “agentsforms forms publish <slug|id>”Publish a draft form.
agentsforms forms publish support-intakeagentsforms forms publish --version 2 support-intake| Flag | Description |
|---|---|
--version <n> | Publish a specific version number |
agentsforms forms list
Section titled “agentsforms forms list”List all forms in the project.
agentsforms forms listagentsforms forms list --status publishedagentsforms forms list --json| Flag | Description |
|---|---|
--status <status> | Filter: draft, published, archived |
--limit <n> | Max results (default 20) |
agentsforms forms get <slug|id>
Section titled “agentsforms forms get <slug|id>”Get a single form by slug or ID.
agentsforms forms get support-intake --jsonagentsforms sessions
Section titled “agentsforms sessions”agentsforms sessions create <slug|id>
Section titled “agentsforms sessions create <slug|id>”Create a new form-filling session.
agentsforms sessions create support-intake \ --expires-in 3600 \| Flag | Description |
|---|---|
--expires-in <seconds> | Session lifetime (default 3600) |
--prefill <key=value> | Prefill a field (repeatable) |
agentsforms sessions extend <session-id>
Section titled “agentsforms sessions extend <session-id>”Extend a session’s expiry.
agentsforms sessions extend sess_xyz789 --by 1800| Flag | Description |
|---|---|
--by <seconds> | Additional seconds to add |
agentsforms submissions
Section titled “agentsforms submissions”agentsforms submissions list <slug|id>
Section titled “agentsforms submissions list <slug|id>”List submissions for a form.
agentsforms submissions list support-intake --limit 20 --jsonagentsforms submissions get <submission-id>
Section titled “agentsforms submissions get <submission-id>”Get a single submission.
agentsforms submissions get sub_def456 --jsonagentsforms submissions tail <slug|id>
Section titled “agentsforms submissions tail <slug|id>”Watch for new submissions in real time.
agentsforms submissions tail support-intakeagentsforms webhooks
Section titled “agentsforms webhooks”agentsforms webhooks create
Section titled “agentsforms webhooks create”Register a webhook.
agentsforms webhooks create \ --url https://your-agent.com/webhook \ --events submission.created,session.expired| Flag | Description |
|---|---|
--url <url> | HTTPS endpoint |
--events <events> | Comma-separated event types |
agentsforms webhooks list
Section titled “agentsforms webhooks list”List registered webhooks.
agentsforms webhooks delete <webhook-id>
Section titled “agentsforms webhooks delete <webhook-id>”Delete a webhook.
agentsforms webhooks deliveries list --webhook-id <id>
Section titled “agentsforms webhooks deliveries list --webhook-id <id>”List delivery attempts.
agentsforms webhooks deliveries replay --delivery-id <id>
Section titled “agentsforms webhooks deliveries replay --delivery-id <id>”Replay a failed delivery.