AI and tools, updated
CLI
The FormThunder CLI is an npm package you can run with npx formthunder. It does what the dashboard does, from forms and brand kits to templates, tests and clients, and any command accepts --json for scripts and AI agents. The same package runs the MCP server. It's included on every plan.
Log in
npx formthunder loginThis opens your browser to approve the device. In CI, set FORMTHUNDER_API_KEY or use login --key. Run npx formthunder whoami to see which account and plan you're on.
Start a project
init detects your framework, creates a form and writes its snippet to stdout.
npx formthunder initCommands
| Command | What it does |
|---|---|
login, logout, whoami | Manage the saved key. |
init | Detect the framework, create a form and print its snippet. |
forms list, create, get, update, delete | Manage forms. |
snippet | Print form code for a framework. |
test | Send a real test. Exits 1 if a delivery failed. |
check | Check a live page is wired up. Exits 1 if a check fails. |
submissions list, get, resend | Read submissions and re-queue failed deliveries. List and get need Pro. |
emails list, add, remove | Manage linked emails. |
brand get, set, pull | Manage the brand kit, or read it from a website. |
template list, push, pull, preview, test, generate | Manage email templates. |
themes | List built-in email themes. |
clients list, create, upgrade, downgrade, invite | Manage client accounts. Agency. |
billing set, get, cancel | Manage a client's retainer through your Stripe. Agency. |
billing upgrade | Open the billing page to change your own plan. |
keys list, create, revoke | Manage API keys. |
use | Make a client account the default for later commands. Agency. |
mcp | Start the stdio MCP server, for AI tools to launch. |
prompt branding | Print a prompt to paste into any AI, to match emails to your site. |
Add --help to any command for its options.
Use it in CI
Both of these exit 1 on failure, so a broken form can fail a deploy.
- name: Check the contact form
run: |
npx formthunder test "$FORM_ID"
npx formthunder check "$FORM_ID" --url https://example.com/contact
env:
FORMTHUNDER_API_KEY: ${{ secrets.FORMTHUNDER_API_KEY }}
FORM_ID: ${{ vars.FORMTHUNDER_FORM_ID }}test sends a real email to your recipients, so run it where that's welcome.
Environment
| Variable | What it does |
|---|---|
FORMTHUNDER_API_KEY | The key to use. Overrides the saved one. |
FORMTHUNDER_URL | The API host, if you're not using the default. |