Motivation Form Docs

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-form

Authentication

mf auth login

Prompts 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 key

Commands

mf create

Scaffold a new form .md file interactively.

mf create

Prompts for title and slug, then writes a starter .md file to the current directory.

mf create --title "Contact Us" --slug contact --output contact.md

Flags:

FlagDescription
--titleForm title (string)
--slugURL slug (lowercase, hyphens)
--outputOutput file path (default: {slug}.md)

mf deploy

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

mf deploy contact.md

Output:

✓ Parsed contact.md
✓ Validated (3 fields)
✓ Deployed → https://form.motivationlabs.ai/contact

If the slug already exists and belongs to your account, the config is updated in place. Existing submissions are not affected.

Flags:

FlagDescription
--dry-runValidate without deploying

mf list

List all forms for your account.

mf list

Output (JSON):

[
  { "slug": "contact", "title": "Contact Us", "submissions": 42, "views": 310 },
  { "slug": "campaign-brief", "title": "Campaign Brief", "submissions": 7, "views": 55 }
]

Flags:

FlagDescription
--jsonAlways output JSON (default when stdout is piped)

mf submissions

Fetch submissions for a form.

mf submissions contact

Output:

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.com

Flags:

FlagDefaultDescription
--limit25Number of submissions to return
--sinceISO 8601 date — only return submissions after this date
--untilISO 8601 date — only return submissions before this date
--jsonOutput 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-30

Outputs a structured Markdown report to stdout. Pipe it to a file or into another command:

mf report contact > reports/contact-april.md

See 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-01

Flags:

FlagDefaultDescription
--formatcsvcsv or json
--outputWrite to file instead of stdout
--sinceFilter by start date (ISO 8601)
--untilFilter 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 contact

Prompts for confirmation before deleting.

Flags:

FlagDescription
--forceSkip confirmation prompt

Global flags

FlagDescription
--api-keyOverride the saved API key for this command only
--api-urlOverride the API base URL (for self-hosted instances)
--jsonForce JSON output on commands that support it
--helpShow help for any command
--versionPrint CLI version

On this page