CLI reference
All mf CLI commands, flags, and output examples.
The mf CLI is planned for developers who manage forms from a terminal. Until the npm package is published, use the REST API or MCP integration for live integrations.
Installation
The motivation-form npm package is not published yet. This page documents the intended command shape so API clients and agents can line up around the same concepts.
Authentication
mf auth loginPrompts for your API key and saves it to ~/.motivation-form/config.json. All subsequent commands use this key automatically.
Commands
mf create
Scaffold a new form .md file.
mf create --title "Contact Us" --slug contact
mf create --title "Contact Us" --slug contact --email you@example.com
mf create --title "Contact Us" --slug contact --out forms/contact.mdWrites a starter .md to disk. Edit the file directly to add fields, branding, and notifications before deploying.
Flags:
| Flag | Required | Description |
|---|---|---|
--title | yes | Form title |
--slug | yes | URL slug (lowercase, hyphens only) |
--email | no | Notification email address (added to frontmatter) |
--out | no | Output file path (default: {slug}.md) |
mf deploy
Parse, validate, and deploy a form .md file to the platform.
mf deploy contact.mdOutput:
✓ Deployed: https://form.gold/acme/contactIf the slug already belongs to your account the config is updated in place. Existing responses are not affected.
mf list
List all forms for your account.
mf list
mf list --jsonHuman-readable output (default):
contact Contact Us
https://form.gold/acme/contact
campaign-brief Campaign Brief
https://form.gold/acme/campaign-briefFlags:
| Flag | Description |
|---|---|
--json | Output raw JSON array |
mf responses
Fetch responses for a form.
mf responses contact
mf responses contact --limit 50
mf responses contact --since 2026-04-01Outputs raw JSON to stdout. Pipe to jq for filtering:
mf responses contact | jq '.[] | select(.payload.email | endswith("@example.com"))'Flags:
| Flag | Default | Description |
|---|---|---|
--limit | 20 | Number of responses to return |
--since | — | ISO 8601 date — only return responses after this date |
mf report
Generate an agent-readable Markdown report for a form.
mf report contact
mf report contact --period 7d
mf report contact --period all > reports/contact-all-time.mdWrites structured Markdown to stdout. See Response reports for the full format spec.
Flags:
| Flag | Default | Description |
|---|---|---|
--period | 30d | 7d, 30d, 90d, or all |
mf export
Export responses as CSV, JSON, or Markdown.
mf export contact # CSV to stdout
mf export contact --format json # JSON to stdout
mf export contact --format md # Markdown table to stdout
mf export contact --since 2026-04-01
mf export contact --since 2026-04-01 --until 2026-04-30Flags:
| Flag | Default | Description |
|---|---|---|
--format | csv | csv, json, or md |
--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 open
Open the public form URL in your default browser.
mf open contactEnvironment variables
| Variable | Description |
|---|---|
MF_API_URL | Override the API base URL — useful for self-hosted instances |