init

Create a new formdata.dev account and store credentials locally.

npx formdata-dev init

Interactive Prompts

The command prompts for three required fields:

Prompt Description
Organization name Your company or project name
Owner email Contact email for the account
Subdomain slug URL-safe slug (e.g. acme for acme.formdata.dev)

Full Output

formdata.dev — Create Account ───────────────────────────── Organization name: Acme Corp Owner email: [email protected] Subdomain slug (e.g. "acme" for acme.formdata.dev): acme Creating account... Account Created ─────────────── Organization: Acme Corp Subdomain: acme.formdata.dev Secret key: sk_live_abc123... Credentials saved to ~/.config/formdata/credentials Warning: Your secret key is shown only once. It is stored in the credentials file. MCP Configuration — add to Claude Desktop or .claude/settings.json: { "mcpServers": { "formdata": { "url": "https://api.formdata.dev/mcp", "headers": { "Authorization": "Bearer sk_live_abc123..." } } } } Create your first form now? (y/n):

Guided Onboarding

After account creation, the CLI offers to:

  1. Create your first form -- runs the same flow as forms create
  2. Add a destination -- runs the same flow as destinations add

If you skip onboarding, the CLI prints next-step commands:

When you are ready: npx formdata-dev forms create Create a form npx formdata-dev destinations add Add a destination npx formdata-dev status Check your setup

Existing Credentials

If credentials already exist, the CLI warns and asks for confirmation before overwriting:

Existing credentials found at ~/.config/formdata/credentials Overwrite and create a new account? (y/n):

Credential Storage

Credentials are saved to ~/.config/formdata/credentials with permissions 0600:

{
  "secretKey": "sk_live_...",
  "apiUrl": "https://api.formdata.dev",
  "organizationName": "Acme Corp",
  "slug": "acme"
}
WARNING

Your secret key is displayed only once during init. It is stored in the credentials file, but if you lose it, you must run keys rotate to generate a new one.

TIP

The MCP equivalent is the get_account tool (read-only). Account creation is only available through the CLI.