CLI reference
All mf CLI commands, flags, and output examples.
The mf CLI is the primary interface for developers who manage forms from a terminal. It calls the same REST API used by the MCP server and web dashboard.
Installation
npm install -g motivation-formAuthentication
mf auth loginPrompts for your API key and saves it to ~/.motivation-form/config.json. All subsequent commands use this key automatically.
mf auth logout # Remove saved credentials
mf auth whoami # Print the account associated with the current keyCommands
mf create
Scaffold a new form .md file interactively.
mf createPrompts for title and slug, then writes a starter .md file to the current directory.
mf create --title "Contact Us" --slug contact --output contact.mdFlags:
| Flag | Description |
|---|---|
--title | Form title (string) |
--slug | URL slug (lowercase, hyphens) |
--output | Output file path (default: {slug}.md) |
mf deploy
Parse, validate, and deploy a form .md file to the platform.
mf deploy contact.mdOutput:
✓ Parsed contact.md
✓ Validated (3 fields)
✓ Deployed → https://form.motivationlabs.ai/contactIf the slug already exists and belongs to your account, the config is updated in place. Existing submissions are not affected.
Flags:
| Flag | Description |
|---|---|
--dry-run | Validate without deploying |
mf list
List all forms for your account.
mf listOutput (JSON):
[
{ "slug": "contact", "title": "Contact Us", "submissions": 42, "views": 310 },
{ "slug": "campaign-brief", "title": "Campaign Brief", "submissions": 7, "views": 55 }
]Flags:
| Flag | Description |
|---|---|
--json | Always output JSON (default when stdout is piped) |
mf submissions
Fetch submissions for a form.
mf submissions contactOutput:
ID Submitted name email
------------------------------------ ------------------- ----------- -----------------------
01JE... 2026-04-28 09:14 Jane Smith jane@example.com
01JD... 2026-04-27 18:30 Alex Chen alex@example.comFlags:
| Flag | Default | Description |
|---|---|---|
--limit | 25 | Number of submissions to return |
--since | — | ISO 8601 date — only return submissions after this date |
--until | — | ISO 8601 date — only return submissions before this date |
--json | — | Output raw JSON |
mf report
Generate an agent-readable Markdown report for a form.
mf report contact
mf report contact --since 2026-04-01 --until 2026-04-30Outputs a structured Markdown report to stdout. Pipe it to a file or into another command:
mf report contact > reports/contact-april.mdSee Submission reports for the full report format.
mf export
Export submissions as CSV or JSON.
mf export contact # CSV to stdout
mf export contact --format json # JSON to stdout
mf export contact --output submissions.csv # Write to file
mf export contact --since 2026-04-01Flags:
| Flag | Default | Description |
|---|---|---|
--format | csv | csv or json |
--output | — | Write to file instead of stdout |
--since | — | Filter by start date (ISO 8601) |
--until | — | Filter by end date (ISO 8601) |
See Data export for CSV column spec and JSON schema.
mf delete
Delete a form and all its submissions. Irreversible.
mf delete contactPrompts for confirmation before deleting.
Flags:
| Flag | Description |
|---|---|
--force | Skip confirmation prompt |
Global flags
| Flag | Description |
|---|---|
--api-key | Override the saved API key for this command only |
--api-url | Override the API base URL (for self-hosted instances) |
--json | Force JSON output on commands that support it |
--help | Show help for any command |
--version | Print CLI version |