Motivation Form

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 login

Prompts 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.md

Writes a starter .md to disk. Edit the file directly to add fields, branding, and notifications before deploying.

Flags:

FlagRequiredDescription
--titleyesForm title
--slugyesURL slug (lowercase, hyphens only)
--emailnoNotification email address (added to frontmatter)
--outnoOutput file path (default: {slug}.md)

mf deploy

Parse, validate, and deploy a form .md file to the platform.

mf deploy contact.md

Output:

✓ Deployed: https://form.gold/acme/contact

If 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 --json

Human-readable output (default):

contact                  Contact Us
                         https://form.gold/acme/contact
campaign-brief           Campaign Brief
                         https://form.gold/acme/campaign-brief

Flags:

FlagDescription
--jsonOutput raw JSON array

mf responses

Fetch responses for a form.

mf responses contact
mf responses contact --limit 50
mf responses contact --since 2026-04-01

Outputs raw JSON to stdout. Pipe to jq for filtering:

mf responses contact | jq '.[] | select(.payload.email | endswith("@example.com"))'

Flags:

FlagDefaultDescription
--limit20Number of responses to return
--sinceISO 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.md

Writes structured Markdown to stdout. See Response reports for the full format spec.

Flags:

FlagDefaultDescription
--period30d7d, 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-30

Flags:

FlagDefaultDescription
--formatcsvcsv, json, or md
--sinceFilter by start date (ISO 8601)
--untilFilter 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 contact

Environment variables

VariableDescription
MF_API_URLOverride the API base URL — useful for self-hosted instances

On this page