Command line
The 1DB CLI does from a terminal what the dashboard does in a browser: add a site, write its keys into your env file, create forms, check a project against 1DB and read back recent leads.
- No install
- Writes .env files
How it works
- 1
Sign in
npx @1db/cli login opens your browser to approve a token for one organization.
- 2
Add a site
1db init <domain> creates the website and its contact form, and writes the key and form slug into your env file.
- 3
Check and test it
1db check looks at the project’s settings against 1DB; add --send to post a test lead and see it arrive.
npx @1db/cli login
npx @1db/cli init northfieldpallets.com --env-file .env.local
npx @1db/cli check northfieldpallets --sendGood to know
- Forms from a template
- 1db form <website> --template quote-request makes a form with the usual fields, or list your own with --fields.
- Alerts and webhooks
- 1db notify <form> --emails or --webhook sets who hears about each lead.
- Recent leads
- 1db leads <website> lists the latest leads, useful for replaying ones a webhook missed.
Guides
- GuideAgents and CLI
Add lead capture to a site with Claude Code
Sign in to 1DB once from your terminal, then ask Claude Code to connect any site’s forms: it adds the site, writes the keys, wires the form and sends a test lead.
- 3 min read
- Claude Code
- MCP
- CLI
- GuideSend leads on
Send form submissions to email and a webhook
Email each new lead to your team and post it as JSON to your own endpoint, with the exact payload, how to check it’s really from 1DB, and what happens when your endpoint is down.
- 3 min read
- Email alerts
- Webhooks
- Slack