Bento

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.



Learning Computer Streamline Icon: https://streamlinehq.comInstallation

Install the Bento CLI globally using npm or Bun:

Code

Verify the installation:

Code

Learning Computer Streamline Icon: https://streamlinehq.comAuthentication

Before using the CLI, you need to authenticate with your Bento account.

1
Get Your API Credentials

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
2
Run the Login Command
Code

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:

Code
3
Verify Connection

Test your authentication by listing your tags:

Code

You should see a list of your tags. That confirms the CLI is authenticated.

Other Auth Commands

Code

Learning Computer Streamline Icon: https://streamlinehq.comCommand Reference

Profile Management

Manage multiple Bento accounts with named profiles.

Add a Profile

Code

List Profiles

Code

Switch Profile

Code

Remove a Profile

Code

Dashboard

Code

Subscribers

Manage your subscriber list from the command line.

Search Subscribers

Code

Import from CSV

Import subscribers in bulk from a CSV file:

Code

CSV Format:

Code

Import or Update Subscribers

Use CSV import for audience syncs. The CLI has no single-subscriber upsert command.

Code

For one subscriber with tags or fields, use tag/subscribe/field commands after import, or call the HTTP API:

Code

Manage Tags on Subscribers

Code

Manage Fields on Subscribers

Code

Subscribe / Unsubscribe

Code

Change Email Address

Code

Tags

View, create, and delete tags for organizing your subscribers.

List Tags

Code

Create a Tag

Code

Delete a Tag

Code

Custom Fields

Manage custom fields for storing additional subscriber data.

List Custom Fields

Code

Create a Custom Field

Code

Events

Track custom events to trigger automations and record subscriber activity.

Track an Event

Code

Track a Purchase

Code

Import Events from JSON

Code

JSON Format:

Code

Broadcasts

Create and manage email broadcasts.

List Broadcasts

Code

Create a Broadcast Draft

Code

Sequences

Manage email sequences and create sequence emails.

List Sequences

Code

Create a Sequence Email

Code

Update a Sequence Email

Code

Transactional Emails

Send individual or batch transactional emails.

Send a Single Email

Code

Batch Send from JSON

Code

JSON Format:

Code

Templates

View and update email templates.

Get a Template

Code

Update a Template

Code

Workflows

View automation workflows.

Code

Forms

Retrieve form submission responses.

Code

Statistics

Get an overview of your Bento account.

Site Statistics

Code

Segment Statistics

Code

Report Statistics

Code

Skills

Install Bento's official AI agent skill package into tools like Claude Code, Cursor, Codex, and OpenCode.

Install Bento Skills

Code

Install For Specific Agents

Code

Experimental

Validate Email

Code

Guess Gender

Code

Geolocate IP

Code

Check Blacklist

Code

Content Moderation

Code

Learning Computer Streamline Icon: https://streamlinehq.comOutput Formats

The CLI supports multiple output formats for integration with other tools.

Default (Human-Readable)

Code

Outputs a formatted table with colors.

JSON Output

Code

Perfect for piping to jq or processing in scripts:

Code

Quiet Mode

Code

Only outputs errors. Useful for scripts and cron jobs.


Learning Computer Streamline Icon: https://streamlinehq.comSafety Features

The CLI includes built-in safety features for bulk operations:

Dry Run

Preview what will happen without making changes:

Code

Limit

Process only the first N items:

Code

Confirmation

Bulk operations require explicit confirmation:

Code

Sample Preview

Preview a subset of items before committing to a bulk operation:

Code

Learning Computer Streamline Icon: https://streamlinehq.comScripting Examples

Import Subscribers from Multiple CSVs

Code

Daily Stats Report

Code

Tag New Signups

Code

CI/CD Integration

Code

Send Transactional Emails

Code

Build a Sequence from Template Files

Code

Multi-Account Profile Switching

Code

Track Purchase Events

Code

Learning Computer Streamline Icon: https://streamlinehq.comEnvironment Variables

Instead of using bento auth login, you can set environment variables:

Code

Add these to your ~/.zshrc or ~/.bashrc for persistence, or use them in CI/CD pipelines.


Learning Computer Streamline Icon: https://streamlinehq.comTroubleshooting

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 login again
  • Verify your API keys in the Bento dashboard
  • Check environment variables if using them

CSV import failing

Check your CSV format:

  • Must have an email column
  • Use UTF-8 encoding
  • No BOM (byte order mark) at the start
  • Try --dry-run first to see parsing results

Debug Mode

For detailed output, use the verbose flag:

Code

This shows the full API request and response for debugging.


Learning Computer Streamline Icon: https://streamlinehq.comQuick Reference

Auth & Profiles

CommandDescription
bento auth loginAuthenticate with Bento
bento auth statusCheck authentication status
bento auth logoutRemove stored credentials
bento profile add <name>Add a new profile
bento profile listList all profiles
bento profile use <name>Switch active profile
bento profile remove <name>Remove a profile
bento dashboardOpen Bento dashboard in browser

Subscribers

CommandDescription
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

CommandDescription
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

CommandDescription
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

CommandDescription
bento broadcasts listList broadcasts
bento broadcasts createCreate a broadcast draft
bento sequences listList 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

CommandDescription
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

CommandDescription
bento workflows listList workflows
bento stats siteView site statistics
bento stats segment <segment-id>View segment statistics
bento stats report <report-id>View report statistics

Skills & Experimental

CommandDescription
bento skills listList 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

FlagDescription
--jsonOutput in JSON format
--quietSuppress non-error output
--verboseShow detailed debug info
--dry-runPreview without making changes
--confirmSkip confirmation prompts
--limit <n>Process only first N items
--sample <n>Show N sample items in preview

Learning Computer Streamline Icon: https://streamlinehq.comGet Help