Bento CLI
Manage your Bento email marketing directly from the terminal.
The Bento CLI gives you 50+ commands for managing your entire Bento account. Search subscribers, import from CSV, manage tags and fields, track events and purchases, create broadcasts and sequences, send transactional emails, manage templates, and more.
Perfect for automation scripts, CI/CD pipelines, multi-account management, or anyone who prefers working in the terminal.
Before you begin, make sure you have:
- A Bento account with API access
- Your Bento API credentials (Publishable Key, Secret Key, Site UUID)
- Node.js 18 or later installed on your machine
Install the Bento CLI globally using npm or Bun:
Verify the installation:
Before using the CLI, you need to authenticate with your Bento account.
Log into your Bento account and go to Team Settings to find your API keys.
You'll need:
- Publishable Key:
pk_live_abc123... - Secret Key:
sk_live_xyz789... - Site UUID: Your unique site identifier
You'll be prompted to enter your credentials. They'll be stored securely for future use.
For scripting or CI/CD, you can pass credentials directly:
Test your authentication by listing your tags:
You should see a list of your tags. That confirms the CLI is authenticated.
Other Auth Commands
Profile Management
Manage multiple Bento accounts with named profiles.
Add a Profile
List Profiles
Switch Profile
Remove a Profile
Dashboard
Subscribers
Manage your subscriber list from the command line.
Search Subscribers
Import from CSV
Import subscribers in bulk from a CSV file:
CSV Format:
Import or Update Subscribers
Use CSV import for audience syncs. The CLI has no single-subscriber upsert command.
For one subscriber with tags or fields, use tag/subscribe/field commands after import, or call the HTTP API:
POST /fetch/subscribers creates one subscriber and can trigger automations. POST /batch/subscribers imports up to 1000 records without triggering automations.Manage Tags on Subscribers
Manage Fields on Subscribers
field set does not trigger automations. Use field update when you need automation triggers to fire.Subscribe / Unsubscribe
Change Email Address
Tags
View, create, and delete tags for organizing your subscribers.
List Tags
Create a Tag
Delete a Tag
Custom Fields
Manage custom fields for storing additional subscriber data.
List Custom Fields
Create a Custom Field
Events
Track custom events to trigger automations and record subscriber activity.
Track an Event
Track a Purchase
--key must be unique per purchase to prevent double-counting.Import Events from JSON
JSON Format:
Broadcasts
Create and manage email broadcasts.
List Broadcasts
Create a Broadcast Draft
Sequences
Manage email sequences and create sequence emails.
List Sequences
Create a Sequence Email
Update a Sequence Email
Transactional Emails
Send individual or batch transactional emails.
Send a Single Email
Batch Send from JSON
JSON Format:
Templates
View and update email templates.
Get a Template
Update a Template
Workflows
View automation workflows.
Forms
Retrieve form submission responses.
Statistics
Get an overview of your Bento account.
Site Statistics
Segment Statistics
Report Statistics
Skills
Install Bento's official AI agent skill package into tools like Claude Code, Cursor, Codex, and OpenCode.
Install Bento Skills
Install For Specific Agents
Experimental
Validate Email
Guess Gender
Geolocate IP
Check Blacklist
Content Moderation
The CLI supports multiple output formats for integration with other tools.
Default (Human-Readable)
Outputs a formatted table with colors.
JSON Output
Perfect for piping to jq or processing in scripts:
Quiet Mode
Only outputs errors. Useful for scripts and cron jobs.
The CLI includes built-in safety features for bulk operations:
Dry Run
Preview what will happen without making changes:
Limit
Process only the first N items:
Confirmation
Bulk operations require explicit confirmation:
Sample Preview
Preview a subset of items before committing to a bulk operation:
Import Subscribers from Multiple CSVs
Daily Stats Report
Tag New Signups
CI/CD Integration
Send Transactional Emails
Build a Sequence from Template Files
Multi-Account Profile Switching
Track Purchase Events
Instead of using bento auth login, you can set environment variables:
Add these to your ~/.zshrc or ~/.bashrc for persistence, or use them in CI/CD pipelines.
Frequently Asked Questions
Find answers to common questions or contact our support team
Command not found: bento
The CLI isn't in your PATH.
- Try reinstalling:
npm install -g @bentonow/bento-cli - Check your npm global bin path:
npm bin -g - Ensure your PATH includes the npm global bin directory
Authentication failed
Your credentials are incorrect or expired.
- Run
bento auth loginagain - Verify your API keys in the Bento dashboard
- Check environment variables if using them
CSV import failing
Check your CSV format:
- Must have an
emailcolumn - Use UTF-8 encoding
- No BOM (byte order mark) at the start
- Try
--dry-runfirst to see parsing results
Debug Mode
For detailed output, use the verbose flag:
This shows the full API request and response for debugging.
Auth & Profiles
| Command | Description |
|---|---|
bento auth login | Authenticate with Bento |
bento auth status | Check authentication status |
bento auth logout | Remove stored credentials |
bento profile add <name> | Add a new profile |
bento profile list | List all profiles |
bento profile use <name> | Switch active profile |
bento profile remove <name> | Remove a profile |
bento dashboard | Open Bento dashboard in browser |
Subscribers
| Command | Description |
|---|---|
bento subscribers search --email <email> | Look up a subscriber |
bento subscribers import <file> | Import from CSV |
bento subscribers import <file> | Bulk import or update from CSV (upsert-style) |
bento subscribers tag --email <email> --add <tags> | Add/remove tags |
bento subscribers field set --email <email> -k <key> -v <value> | Set a field value |
bento subscribers field update --email <email> --fields <json> | Update fields (triggers automations) |
bento subscribers field remove --email <email> -k <key> | Remove a field |
bento subscribers subscribe --email <email> | Re-subscribe a subscriber |
bento subscribers unsubscribe --email <email> | Unsubscribe a subscriber |
bento subscribers change-email --old <email> --new <email> | Change subscriber email |
Tags & Fields
| Command | Description |
|---|---|
bento tags list [search] | List tags (optional fuzzy filter) |
bento tags create <name> | Create a new tag |
bento tags delete <name> | Delete a tag |
bento fields list [search] | List custom fields (optional fuzzy filter) |
bento fields create <key> | Create a custom field |
Events
| Command | Description |
|---|---|
bento events track --email <email> --event <name> | Track an event |
bento events purchase --email <email> --amount <cents> --currency <code> --key <id> | Track a purchase |
bento events import <file> | Bulk import events from JSON |
Broadcasts & Sequences
| Command | Description |
|---|---|
bento broadcasts list | List broadcasts |
bento broadcasts create | Create a broadcast draft |
bento sequences list | List email sequences |
bento sequences create-email --sequence-id <id> | Create email in a sequence |
bento sequences update-email --template-id <id> | Update a sequence email |
Emails, Templates & Forms
| Command | Description |
|---|---|
bento emails send --to <email> --from <email> --subject <text> --html-body <html> | Send transactional email |
bento emails send-batch --file <json> | Batch send transactional emails |
bento templates get <id> | Get an email template |
bento templates update <id> | Update an email template |
bento forms responses <form-id> | Get form responses |
Workflows, Stats & Dashboard
| Command | Description |
|---|---|
bento workflows list | List workflows |
bento stats site | View site statistics |
bento stats segment <segment-id> | View segment statistics |
bento stats report <report-id> | View report statistics |
Skills & Experimental
| Command | Description |
|---|---|
bento skills list | List available skills |
bento skills install [skill-name] | Install skills to AI agents |
bento experimental validate-email <email> | Validate an email address |
bento experimental guess-gender <name> | Guess gender from name |
bento experimental geolocate <ip> | Geolocate an IP address |
bento experimental blacklist --domain <domain> | Check blacklist status |
bento experimental moderate <content> | Content moderation |
Global Flags
| Flag | Description |
|---|---|
--json | Output in JSON format |
--quiet | Suppress non-error output |
--verbose | Show detailed debug info |
--dry-run | Preview without making changes |
--confirm | Skip confirmation prompts |
--limit <n> | Process only first N items |
--sample <n> | Show N sample items in preview |
- GitHub Repository: github.com/bentonow/bento-cli
- Issues & Feature Requests: github.com/bentonow/bento-cli/issues
- Discord: Join the community
- Email Support: support@bentonow.com
- Bento MCP Server - AI-powered email marketing with Claude, Cursor, and more
- Node.js SDK - Integrate Bento into your Node.js applications
- API Reference - Full API documentation
- Bento Skills - Give AI agents Bento-specific implementation and safety guidance