leadgrow-bison-cli
v0.1.9
Published
CLI for EmailBison — manage campaigns, leads, email accounts, warmup, and more from the command line.
Maintainers
Readme
EmailBison CLI
EmailBison in your terminal. Manage cold email campaigns, leads, email accounts, warmup, and more — from the command line or through AI assistants.
117 MCP tools | 130+ commands | 100% API coverage | 1 dependency
Quick Start
npm install -g leadgrow-bison-cli
bison setupThe setup wizard walks you through:
- Entering your API key (from EmailBison → Settings → Developer API)
- Verifying the connection
- Configuring AI integration for Claude, Cursor, and other MCP clients
Or configure manually:
bison auth login --api-key YOUR_API_KEY
bison campaigns listInstallation
npm (recommended):
npm install -g leadgrow-bison-cliFrom source:
git clone https://github.com/LeadGrowGTM/leadgrow-bison-cli.git
cd leadgrow-bison-cli
npm install && npm run build
npm install -g .Requires Node.js 18 or higher.
Authentication
Three ways to authenticate, checked in this order:
| Method | How |
|--------|-----|
| Flags | --api-key on any command |
| Environment | BISON_API_KEY env var |
| Config file | bison auth login --api-key KEY saves to ~/.bison/config.json |
The login command validates your key against the API before saving.
# Interactive setup (recommended)
bison setup
# Direct login
bison auth login --api-key sk_live_abc123
# Environment variable
export BISON_API_KEY=sk_live_abc123
bison campaigns list
# Custom instance
bison auth login --api-key KEY --base-url https://your-instance.com/apiAPI key permissions: A regular API user key works for all campaign, lead, account, and inbox operations. Super admin keys are only needed for workspace management (creating/deleting workspaces, generating tokens).
Capabilities
What You Can Do
| Category | Capabilities | |----------|-------------| | Campaigns | List, create, update, duplicate, pause, resume, archive, delete, bulk delete, get stats | | Sequences | Create email steps, update steps, delete steps, toggle A/B variants, send test emails | | Leads | List, search, create, update, upsert, bulk create/upsert, import CSV, delete, bulk delete, update status, unsubscribe, blacklist | | Replies | List, filter (interested/automated/folder), read, compose, reply, forward, mark interested/read/automated, thread view, delete | | Email Accounts | List, create (IMAP/SMTP), bulk create from CSV, update, delete, check MX, bulk check MX, update signatures/limits, get OAuth tokens | | Warmup | List, enable/disable per account, update limits | | Workspaces | List, switch, create, delete, invite members, create API tokens, stats | | Tags | Create, delete, attach/remove from campaigns, leads, and senders | | Blacklists | Add/remove emails and domains, bulk add from CSV | | Webhooks | Create, update, delete, list event types, test with sample payloads | | Tracking | Custom tracking domains — create, list, delete | | Variables | Custom lead variables for personalization | | Scheduling | Campaign send schedules, templates, timezones | | Events | Campaign event breakdowns by date range | | AI/MCP | Built-in MCP server with 117 tools for Claude, Cursor, and other AI assistants |
Commands
Auth & Config
bison setup # Interactive setup wizard
bison auth login --api-key K # Save and verify API key
bison auth logout # Remove saved API key
bison auth status # Check connection and account info
bison auth whoami # Same as status
bison auth token # Generate headless UI token
bison auth profile-picture f # Upload profile picture
bison auth update-password # Change account password
bison config show # View current config
bison config set --api-key K # Update config values
bison config reset # Reset to defaults
bison config path # Print config file locationCampaigns
bison campaigns list # List all campaigns
bison campaigns list --status active # Filter by status
bison campaigns get <id> # Get campaign details
bison campaigns create --name "Q1 Push" # Create campaign
bison campaigns update <id> --name "Q2" # Update campaign
bison campaigns duplicate <id> # Duplicate campaign
bison campaigns pause <id> # Pause campaign
bison campaigns resume <id> # Resume campaign
bison campaigns archive <id> # Archive campaign
bison campaigns delete <id> # Delete campaign
bison campaigns bulk-delete --ids 1,2,3 # Bulk delete
# Stats — both dates are REQUIRED
bison campaigns stats <id> --start-date 2025-01-01 --end-date 2025-03-31
bison campaigns full-stats <id> --start-date 2025-01-01 --end-date 2025-03-31Campaign Schedule
bison campaigns schedule get <id> # Get schedule
bison campaigns schedule create <id> # Create schedule
bison campaigns schedule update <id> # Update schedule
bison campaigns schedule from-template <id> # Apply template
bison campaigns schedule templates # List templates
bison campaigns schedule timezones # List timezones
bison campaigns schedule sending-list # All sending schedules
bison campaigns schedule sending <id> # Campaign's scheduleCampaign Sequence
bison campaigns sequence get-steps <campaignId> # View steps (v1.1)
bison campaigns sequence get <campaignId> # View full sequence (deprecated)
bison campaigns sequence create-step <campaignId> --data '...' # Create steps
bison campaigns sequence update-step <sequenceId> --data '...' # Update steps
bison campaigns sequence delete-step <stepId> # Delete step
bison campaigns sequence toggle-variant <stepId> --active # Activate variant
bison campaigns sequence toggle-variant <stepId> --no-active # Deactivate variant
bison campaigns sequence test-email <stepId> --to email --sender-email-id NSequence JSON format:
{
"title": "My Sequence",
"sequence_steps": [
{
"email_subject": "Quick question about {COMPANY_NAME}",
"email_body": "Hey {FIRST_NAME}, ...",
"wait_in_days": 1
},
{
"email_subject": "Re: Quick question",
"email_body": "Following up...",
"wait_in_days": 3,
"thread_reply": true
}
]
}Campaign Leads & Senders
bison campaigns leads list <id> # Campaign's leads
bison campaigns leads import <id> # Import from list
bison campaigns leads add <id> # Add leads by ID
bison campaigns leads move <id> # Move to another campaign
bison campaigns leads stop <id> # Stop future emails
bison campaigns leads remove <id> # Remove leads
bison campaigns senders list <id> # Campaign's senders
bison campaigns senders attach <id> # Attach senders
bison campaigns senders remove <id> # Remove senders
bison campaigns replies list <id> # Campaign's replies
bison campaigns replies send <id> # Send reply
bison campaigns emails list <id> # Scheduled emailsLeads
bison leads list # List all leads
bison leads list --search "acme" # Search leads
bison leads get <id> # Get lead details
bison leads create --email [email protected] # Create lead
bison leads update <id> --name "Jane" # Update lead
bison leads replace <id> # Full replace (PUT)
bison leads delete <id> # Delete lead
bison leads bulk-create --data '[...]' # Create multiple
bison leads bulk-upsert --data '[...]' # Create or update multiple
bison leads upsert --email [email protected] # Single upsert
bison leads import-csv <file> # Import from CSV
bison leads bulk-delete --ids 1,2,3 # Bulk delete
bison leads update-status <id> # Update status
bison leads bulk-update-status # Bulk update status
bison leads unsubscribe <id> # Unsubscribe
bison leads blacklist <id> # Add to blacklist
bison leads replies <id> # Lead's replies
bison leads emails <id> # Lead's scheduled emails
bison leads sent-emails <id> # Lead's sent emailsReplies (Master Inbox)
bison replies list # List all replies
bison replies list --status interested # Filter by status
bison replies get <id> # Get reply details
bison replies compose # Send new email
bison replies reply <id> # Reply to thread
bison replies forward <id> # Forward reply
bison replies mark-interested <id> # Mark interested
bison replies mark-not-interested <id> # Mark not interested
bison replies mark-read <id> # Mark as read
bison replies mark-unread <id> # Mark as unread
bison replies mark-automated <id> # Mark automated
bison replies mark-not-automated <id> # Mark not automated
bison replies unsubscribe <id> # Unsubscribe contact
bison replies delete <id> # Delete reply
bison replies thread <id> # Conversation thread
bison replies attach-scheduled <id> # Attach scheduled email
bison replies push-followup <id> # Push to followup campaignEmail Accounts
bison accounts list # List all accounts
bison accounts get <id> # Account details
bison accounts create # Create IMAP/SMTP account
bison accounts update <id> # Update account
bison accounts delete <id> # Delete account
bison accounts bulk-create <file> # Bulk add from CSV
bison accounts campaigns <id> # Account's campaigns
bison accounts replies <id> # Account's replies
bison accounts oauth-token <id> # Get OAuth token
bison accounts check-mx <id> # Check MX records
bison accounts bulk-check-mx # Bulk check all MX
bison accounts update-signatures # Bulk update signatures
bison accounts update-limits # Bulk update daily limitsWarmup
bison warmup list # List warmup status
bison warmup get <id> # Warmup details
bison warmup enable <id> # Enable warmup
bison warmup disable <id> # Disable warmup
bison warmup update-limits <id> # Update warmup limitsTags, Blacklists, Webhooks & More
# Tags
bison tags list | get | create | delete
bison tags attach-campaigns | remove-campaigns
bison tags attach-leads | remove-leads
bison tags attach-senders | remove-senders
# Email Blacklist
bison blacklist emails list | add | get | remove | bulk-add
# Domain Blacklist
bison blacklist domains list | add | get | remove | bulk-add
# Webhooks
bison webhooks list | get | create | update | delete
# Webhook Events
bison webhook-events types | sample | test
# Tracking Domains
bison tracking list | get | create | delete
# Custom Lead Variables
bison variables list | create
# Ignore Phrases
bison phrases list | get | create | delete
# Reply Templates
bison templates list | get | create | update | delete
# Scheduled Emails
bison scheduled list | get
# Campaign Events
bison events breakdown --campaign-ids N --start-date YYYY-MM-DD --end-date YYYY-MM-DDWorkspaces
bison workspaces list # List workspaces
bison workspaces get <id> # Workspace details
bison workspaces create --name "Ops" # Create workspace
bison workspaces update <id> # Update workspace
bison workspaces delete <id> # Delete workspace (super admin)
bison workspaces switch --team-id <id> # Switch workspace
bison workspaces create-user <id> # Create user in workspace
bison workspaces create-token <id> # Create API token (super admin)
bison workspaces invite <id> # Invite member
bison workspaces accept-invite # Accept invitation
bison workspaces remove-member <id> # Remove member
bison workspaces stats <id> # Workspace stats
bison workspaces full-stats <id> # Full statistics
bison workspaces master-inbox <id> # Master inbox settings
bison workspaces update-master-inbox <id> # Update inbox settingsImportant Notes & Gotchas
Things to know to avoid errors:
| Topic | Details |
|-------|---------|
| Workspace first | Always switch workspace before operating: bison workspaces switch --team-id <id> |
| Stats require dates | stats and full-stats need both --start-date and --end-date (YYYY-MM-DD) |
| Events flag | events breakdown uses --campaign-ids (plural), not --campaign-id |
| wait_in_days | Minimum value is 1 (not 0) when creating sequence steps |
| create-step appends | create-step adds to existing steps — it does not replace them |
| update-step IDs | update-step requires id and order on every step object |
| A/B variants | Split test variants can only be created in the web UI. The API can read and toggle (activate/deactivate) existing variants, but cannot create new ones |
| Variables | Use single braces: {FIRST_NAME}, {COMPANY_NAME} — not {{double braces}} |
| thread_reply | Setting thread_reply: true auto-prepends "Re: " to the subject — don't add it yourself |
Output Options
Every command supports these global flags:
# Machine-readable JSON
bison campaigns list --json
# Select specific fields
bison campaigns list --fields "id,name,status,replied,interested"
# Silent mode — exit code only (0=success, 1=error)
bison campaigns pause 42 --quiet
# Combine with jq
bison leads list --json | jq '.[] | .email'
# Pipe between commands
bison campaigns list --json --fields "id" | jq -r '.[].id'Default output is formatted tables for humans. Use --json for scripts and pipelines.
AI Integration (MCP)
The CLI includes a built-in MCP (Model Context Protocol) server with 117 tools. This lets AI assistants like Claude, Cursor, and other MCP clients manage EmailBison directly.
One-command setup
bison mcp setupThis auto-configures Claude Desktop, Claude Code, and Cursor. Or run it during bison setup.
Manual MCP configuration
Add to your MCP client config (e.g., ~/.claude/mcp_servers.json):
{
"mcpServers": {
"emailbison": {
"command": "bison",
"args": ["mcp"],
"env": {
"BISON_API_KEY": "your-api-key"
}
}
}
}MCP management
bison mcp setup # Configure all AI clients
bison mcp setup --client cursor # Configure specific client
bison mcp status # Check which clients are configured
bison mcp remove # Remove from all clients
bison mcp # Start MCP server directly (for testing)Claude Code context
Running bison mcp setup also injects CLI context into ~/.claude/CLAUDE.md so Claude Code knows the CLI is available. Run bison docs anytime for the full command reference.
Configuration
Config file location: ~/.bison/config.json
bison config show # View current config (API key is masked)
bison config set # Update values
bison config reset # Reset to defaults
bison config path # Print file pathEnvironment Variables
| Variable | Description | Overrides |
|----------|-------------|-----------|
| BISON_API_KEY | API key | Config file key |
| BISON_BASE_URL | API base URL | Config file URL |
Environment variables always take precedence over the config file.
Scripting & Automation
The CLI is designed for scripting, CI/CD pipelines, and AI agents:
# Exit codes: 0=success, 1=error, 2=auth missing
bison campaigns pause 42 --quiet && echo "Paused"
# JSON input via stdin
echo '{"name":"New Campaign"}' | bison campaigns create --data -
# Bulk operations
bison leads import-csv leads.csv
bison accounts bulk-create accounts.csv
bison leads bulk-delete --ids 1,2,3,4,5
# Environment-based auth for CI
BISON_API_KEY=sk_live_xxx bison campaigns list --jsonLicense
MIT — Leadgrow.ai
