Table of contents
Get insights delivered straight into your inbox every week!

How I Automate My Cold Outreach Workflows With a CLI

My outbound work every week is repeatable. Pulling fresh contacts. Checking mailbox health. Spinning up a new workspace for a different market. Adding LinkedIn steps to email sequences. Rotating out a sender that is drifting.

Running all of that through different dashboards takes longer than the work itself deserves. So I moved the repeatable parts into the terminal. Below is what that means, how it compares to an MCP setup, and the cold outreach workflows I script first across both email and LinkedIn.

What is a CLI?

CLI stands for command line interface. It is a way to interact with software by typing commands instead of clicking through a screen. If you have ever opened Terminal on a Mac or PowerShell on Windows, you have used a CLI.

A CLI for cold outreach is the same idea. Instead of opening a dashboard to find your sequences, you type a command that lists them. Instead of clicking into a warmup tool to check a score, you type a command that returns the score as data.

Commands always return the same output for the same input, which makes them useful for repeatable work. Put commands in a script, run that script on a schedule, and the result is identical every time.

CLI vs MCP for cold outreach: which one do I use when?

Both a CLI and an MCP setup let you run cold outreach tasks without clicking through dashboards. They are not the same thing, though, and the right one depends on what you are trying to do.

A CLI is a tool you (or a script) call directly. You type a command, the tool runs it, you get a result. The same input gives the same output every time.

An MCP setup is a way to expose those same actions to an AI assistant like Claude Code, Cursor, or Windsurf. You describe what you want in plain English. The assistant picks the right tool and runs it.

Same underlying actions, different interfaces. Here is when I reach for each.

Cold outreach task Use a CLI Use MCP
Pulling fresh leads every morning at 7am
Asking which mailboxes had the lowest reply rate last week
Posting daily warmup heat scores to a Slack channel
Drafting a 5-step email and LinkedIn sequence from a brief
Rotating flagged mailboxes across 60 domains
Adding a LinkedIn connection request step to an existing sequence
Reading positive-reply threads to find what is working
Spinning up a new campaign workspace end-to-end on a repeatable script
Ad-hoc analysis comparing two campaigns

Why to Use the CLI with an AI assistant

CLI and MCP are not strictly either-or. A CLI can also be exposed to an AI assistant as a tool.

The reason this matters is tokens. Benchmarks show MCP servers can use up to 35x more tokens than equivalent CLI tools on identical tasks, because the full tool schema gets injected into the model's context on every turn. A CLI is leaner because the assistant only loads help text for the command it wants to run. I cover the setup later in this post.

Why automate cold outreach workflows with a CLI?

A lot of cold outreach work is the same task done over and over. Pull a list. Check a number. Rotate a mailbox. Add a LinkedIn step to a sequence. Start a new campaign workspace.

When I script that kind of work, three things change.

  • Speed: what used to take 20 minutes of clicking now runs in seconds.
  • Consistency: the same script runs the same way every Monday, even if I am travelling.
  • Composability: CLI output is JSON, so I pipe it into Slack, a spreadsheet, a cron job, or anything else.

What do I need before I can script anything?

Three things.

  1. An account on one or more Forge products with API access.
  2. Node.js 20.11 or newer installed on your machine. The CLI is published as an npm package.
  3. A terminal. Terminal on macOS, PowerShell on Windows, or any shell on Linux.

That is the full prerequisite list. Basic terminal comfort is enough.

How do I install the Forge CLI and log in?

One command installs the CLI globally.

npm install -g @salesforge/forge-cli

# verify
forge --help

# log in (recommended)
printf '%s' "$SALESFORGE_API_KEY" | forge login salesforge --key-stdin
printf '%s' "$MAILFORGE_API_KEY" | forge login mailforge --key-stdin
printf '%s' "$WARMFORGE_API_KEY" | forge login warmforge --key-stdin

# or use env vars for CI
export SALESFORGE_API_KEY="..."
export MAILFORGE_API_KEY="..."

# check what is configured
forge status --pretty

Generate an API key for each product. Log into the app, go to Settings then API, and click Generate API Key.

  • Salesforge: app.salesforge.ai
  • Primeforge: app.primeforge.ai
  • Leadsforge: app.leadsforge.ai
  • Infraforge: app.infraforge.ai
  • Warmforge: app.warmforge.ai
  • Mailforge: app.mailforge.ai

Stored config lives at ~/.config/forge-cli/config.json with file mode 0600.

How does the Forge CLI actually work?

The CLI talks directly to each Forge product's API using your keys. Three things to know.

  • Keys stay on your computer. The config file at ~/.config/forge-cli/config.json is written with file mode 0600, readable only by your user account.
  • Each command only needs the key for the product it touches. A Mailforge command does not require a Salesforge key.
  • Actions execute through authenticated API requests. The CLI is the same engine the dashboards use. Anything you do from the terminal shows up in the dashboard immediately.

Which Forge products does the CLI cover?

All six Forge products are supported through a single binary. You only need API keys for the products you actually use.

Product What the CLI exposes
Salesforge Workspaces, contacts, sequences, mailboxes, sender profiles, enrollments, webhooks, email validation, do-not-contact lists
Mailforge Workspaces, domains, mailboxes, DNS, domain availability
Primeforge Workspaces, domains, mailboxes, DNS management, prewarmed mailboxes
Infraforge Workspaces, domains, mailboxes, DNS, domain availability, credits
Leadsforge Contact search, email enrichment, phone enrichment, LinkedIn enrichment, lookalike search
Warmforge Mailboxes, warmup stats, placement tests

Commands for products without a configured key return an authentication error. You do not have to install six separate tools.

What does my first command look like?

Once the CLI is installed and at least one product is configured, the simplest thing to try is listing your Salesforge workspaces.

forge salesforge workspaces list --limit 50 --pretty

# pull a single workspace
forge salesforge workspaces get --workspace-id ws_123

# list active Mailforge domains
forge mailforge domains list --status active

Every command follows the same shape: product, resource, action, flags. Data comes back as JSON.

How do I discover commands without memorising them?

The CLI has a built-in command browser, so documentation lives inside the tool itself.

Show every command available with the keys you currently have configured.

forge commands list --available --names

# filter to one product
forge commands list --product mailforge --names

# describe a specific command or use --help directly
forge commands describe mailforge_list_domains --pretty
forge mailforge domains list --help

Grouped form vs registry name form

Every command can be called in two ways.

  • Grouped form, readable and easy to remember: forge salesforge workspaces list
  • Registry name form, flat and easier to use in scripts: forge list_workspaces

Flags use kebab-case and map to API field names, so --workspace-id becomes workspaceId automatically.

Which cold outreach workflows do I automate first?

Seven. Four on the email side, three on the LinkedIn side. They cover most of the repeatable work for any team running outbound at scale.

Cold email workflows

1. Daily lead refresh

Goal: pull a fresh list of contacts matching the ICP from Leadsforge each morning, then push them straight into a Salesforge sequence.

Doing it before the team logs in means the first cohort is already in the sequence by 8am.

# search Leadsforge for matching contacts
forge leadsforge_search --json '{"limit":50,"leadLocations":{"include":["United States"]}}' > leads.json

# import into a Salesforge workspace
cat leads.json | forge salesforge contacts import --workspace-id ws_123 --stdin

Wrap that in a script and trigger it via cron at 7am. The list is fresh and the sequence is loaded before the team has finished their first coffee.

2. Weekly mailbox health check

Goal: pull warmup stats from Warmforge and reply-rate data from Salesforge, then post a summary to a Slack channel every Monday.

This is the single most useful thing I script. Catching a drifting mailbox in week one is cheap.

# pull warmup heat scores for all mailboxes
forge warmforge mailboxes list --fields email,heatScore --pretty

# pull reply rates over the last 7 days from Salesforge
forge salesforge mailboxes list --fields email,replyRate7d --pretty

Pipe the JSON into a small script that flags anything under an 85 heat score or under a 1 percent reply rate, then post to Slack.

3. Domain and mailbox rotation

Goal: list all active domains and mailboxes across Mailforge, Infraforge, and Primeforge, identify any that are flagged, and reassign senders.

My rule: keep about 50 percent of installed capacity as warmed backups. When something gets flagged, I pause it and replace it the same day.

# list active Mailforge domains
forge mailforge domains list --status active --fields id,name,status

# list Infraforge mailboxes with their sender profiles
forge infraforge mailboxes list --fields email,status,senderProfileId

A small script identifies underperformers, pauses them in Salesforge, and assigns a warm backup.

4. Spinning up a new campaign workspace

Goal: stand up a new Salesforge workspace for a new market or test campaign. Doing this by hand takes about an hour. Scripted, it takes seconds.

# create the workspace for a new market test
forge salesforge workspaces create --name "US Mid-Market - Q2 Test" --quiet

# attach senders, import contacts, enroll in a sequence
forge salesforge contacts import --workspace-id ws_new --file midmarket_us.csv
forge salesforge enrollments create --workspace-id ws_new --sequence-id seq_default

This is the workflow that lets me run more experiments in a quarter.

LinkedIn outreach workflows

Salesforge sequences are multi-channel by design. The same sequence object can mix email steps with LinkedIn connection requests, profile visits, and InMail messages. The CLI exposes those sequences and the sender profiles attached to them.

5. Adding a LinkedIn touch to an existing sequence

Goal: take a sequence that started life as email-only and add a LinkedIn connection request step on day 3, plus a LinkedIn message step on day 7.

# fetch the current sequence definition
forge salesforge sequences get --sequence-id seq_abc --pretty > seq.json

# edit seq.json to add the LinkedIn steps, then push it back
cat seq.json | forge salesforge sequences update --sequence-id seq_abc --stdin

6. Rotating LinkedIn sender profiles

Goal: list LinkedIn sender profiles, identify any that are flagged, and reassign to a healthy backup. Same pattern as email mailbox rotation, different channel.

# list all sender profiles, including LinkedIn ones
forge salesforge sender_profiles list --fields id,name,channel,status

# list sequences that use a flagged sender profile
forge salesforge sequences list --fields id,name,senderProfileId,status

7. Building a multi-channel sequence from a template

Goal: launch a new multi-channel campaign from a saved template that already has the right mix of email and LinkedIn steps. Turns a 30-minute dashboard task into a 10-second command.

# create the new sequence from a saved template
cat templates/multichannel_5step.json | forge salesforge sequences create --workspace-id ws_new --stdin

# enroll the fresh contact list into it
forge salesforge enrollments create --workspace-id ws_new --sequence-id $NEW_SEQ_ID --file contacts.csv

How do I pipe CLI output into the rest of my stack?

By default, the CLI prints compact JSON to stdout. That is the format that makes everything else possible.

Pretty-print when reading, pick only the fields you need, or pipe into jq for filtering.

forge salesforge workspaces list --pretty
forge mailforge domains list --fields id,name,status
forge warmforge mailboxes list | jq '.[] | select(.heatScore < 85)'

Suppress output when you just want to fire off a create or update.

forge salesforge workspaces create --name "Outbound" --quiet

Errors go to stderr as JSON, so scripts can detect them cleanly. Exit codes follow standard conventions: 0 for success, 1 for runtime errors, 2 for usage errors, 3 for auth errors.

How do I run the same automations across multiple workspaces or environments?

If you want to keep your main Salesforge keys separate from a sandbox, or run the same script against two team workspaces, profiles handle it.

forge --profile main salesforge workspaces list
forge --profile sandbox salesforge workspaces list

# fully separate config file
forge --config /path/to/other-config.json salesforge workspaces list

Each profile holds its own keys.

How do I troubleshoot the most common CLI errors?

Three errors cover most setup issues.

forge: command not found. The global npm bin directory is not on your PATH. Run npm bin -g and add the result to your shell profile.

Salesforge API key is required. Either log in for that product, or export the matching environment variable.

Wrong key being used. Per-command flags override environment variables, which override stored config. Run forge status --pretty to see what is active.

If a command needs complex nested input, three options: inline JSON, a file, or piped stdin.

forge leadsforge_search --json '{"limit":10,"leadLocations":{"include":["United States"]}}'
forge create_contact --file contact.json
cat search.json | forge leadsforge_search --stdin

Can I use the Forge CLI with an AI assistant?

Yes. The same binary also runs as an MCP server, which makes the same Forge commands available to an AI assistant as tools.

Add this to the assistant's MCP config.

{
  "mcpServers": {
    "forge": {
      "command": "forge",
      "args": ["mcp"],
      "env": {
        "SALESFORGE_API_KEY": "...",
        "MAILFORGE_API_KEY": "..."
      }
    }
  }
}

Only configure keys for the products you actually use.

If you do not want to install the CLI at all, the hosted Forge MCP Server covers the same ground without a local install. The trade-off is more token overhead per turn. For high-volume AI workflows, the local CLI in MCP mode is leaner.

Frequently asked questions

1. What is the Forge CLI?

The Forge CLI is a single command-line tool that runs Salesforge, Mailforge, Primeforge, Infraforge, Leadsforge, and Warmforge from your terminal. It talks directly to each product's API using your keys, so every action you do in the dashboards becomes a command you can script, schedule, or chain.

2. Do I need to be a developer to use the Forge CLI?

No. Basic terminal comfort is enough. The setup is a single npm install, a few API keys, and one config file.

3. Is the Forge CLI free?

The CLI itself is free. You only pay for the Forge products it talks to. If you already have a Salesforge, Mailforge, Warmforge, or any other Forge account, the CLI adds no extra cost.

4. Can I run the Forge CLI alongside the dashboards?

Yes. The CLI uses the same API as the dashboards, so anything you do from the terminal shows up in the dashboard immediately. Most teams use both.

5. How is the Forge CLI different from MCP?

A CLI is a tool you call directly. An MCP setup exposes the same actions to an AI assistant like Claude Code, Cursor, or Windsurf, which decides which command to run based on a plain-English prompt. Use a CLI for repeatable cold outreach work. Use MCP for conversational analysis or sequence drafting.

6. Does using the Forge CLI with an AI assistant cost less than a regular MCP server?

Generally yes, in token terms. Published benchmarks show MCP servers can use up to 35x more tokens than equivalent CLI tools on identical tasks, because the full tool schema gets injected into the model's context on every turn. Running the Forge CLI in MCP mode means the assistant only loads help text for the specific command it wants to run.

7. What can I automate with the Forge CLI on day one?

On the email side: daily lead refresh from Leadsforge into a Salesforge sequence, weekly mailbox health checks across Warmforge and Salesforge, domain and mailbox rotation across Mailforge, Infraforge, and Primeforge, and spinning up a new campaign workspace. On the LinkedIn side: adding a LinkedIn touch to an existing sequence, rotating LinkedIn sender profiles, and building a multi-channel sequence from a template.

8. Can the Forge CLI handle LinkedIn outreach too, or just email?

Both. Salesforge sequences are multi-channel by design, so the same sequence object can mix email steps with LinkedIn connection requests, profile visits, and InMail messages. The CLI exposes sequences, sender profiles, and enrollments, which means anything you can build in a multi-channel sequence in the dashboard can also be built from the terminal.

Forge CLI resources

npm package: https://www.npmjs.com/package/@salesforge/forge-cli

GitHub repository: https://github.com/SalesforgeAI/forge-cli

If you run into issues, the Salesforge support chat is the fastest way to get unblocked.

Start a free trial of Salesforge

Free 14-day trial. No credit card required.

Start free trial →