Salesprompter CLI
The command-line workspace for defining your ICP, finding leads, qualifying them, and syncing results.
The CLI is the implemented product surface in this repository. Use it when you want repeatable workflows, inspectable outputs, and commands that work well for both humans and agents.
Prompt mapping
When a user or coding agent discovers the CLI from a natural-language request, use this map first.
| Natural-language request | Meaning | Best first command |
|---|---|---|
| "Determine the ICP of deel.com" | unclear, needs disambiguation | decide whether Deel is the vendor or the target account |
| "Find leads at deel.com" | Deel is the target account | account:resolve or leads:generate --domain deel.com |
| "I sell for Deel and need target accounts" | Deel is the vendor | icp:vendor --vendor deel --market ... |
| "Generate leads and give me JSON" | agent-oriented execution | add --json to the chosen workflow |
The most important product rule is this:
--domain deel.comtargets Deel itself--vendor deeltargets the market Deel should sell into
Design principles
- Commands read and write JSON artifacts.
- Every non-auth command requires a valid session unless
SALESPROMPTER_SKIP_AUTH=1. - Success output can be made machine-oriented with
--json. - Successful stdout can be suppressed with
--quiet. - Provider output is labeled
realorfallback.
Command families
| Family | Commands |
|---|---|
| Auth | auth:login, auth:whoami, auth:logout |
| ICP and accounts | icp:define, icp:vendor, account:resolve |
| Lead workflows | leads:generate, leads:enrich, leads:score |
| Sync | sync:crm, sync:outreach |
Global flags
| Flag | Effect |
|---|---|
--json |
Compact machine-readable JSON output |
--quiet |
Suppress successful stdout output |
Errors still surface even when --quiet is used.
Session behavior
The CLI stores its local session file at:
~/.config/salesprompter/auth-session.json
You can override that directory with SALESPROMPTER_CONFIG_DIR.
Every non-auth command runs a pre-action auth guard:
auth:*commands skip the guardSALESPROMPTER_SKIP_AUTH=1bypasses the guard for tests and local development only- expired sessions fail before the command body runs
Exit codes
The CLI maps error classes to stable exit codes:
| Exit code | Meaning |
|---|---|
1 |
runtime error |
2 |
invalid arguments |
3 |
auth required or session expired |
Fallback versus real providers
The default lead generation, enrichment, and scoring providers in this repo are heuristic implementations. They are useful for:
- validating workflow shape
- stabilizing output contracts
- testing sync and artifact semantics
They are not proof of verified people or company data. When output is heuristic, the CLI reports mode: "fallback". Real providers should keep the same shapes and upgrade only the provider behavior.
Most common paths
Ad hoc ICP to scored leads
node ./dist/cli.js icp:define --name "Example ICP" --out ./data/icp.json
node ./dist/cli.js leads:generate --icp ./data/icp.json --count 5 --out ./data/leads.json
node ./dist/cli.js leads:enrich --in ./data/leads.json --out ./data/enriched.json
node ./dist/cli.js leads:score --icp ./data/icp.json --in ./data/enriched.json --out ./data/scored.json
Preview an outreach sync
node ./dist/cli.js sync:outreach --target instantly --in ./data/scored.json --campaign-id "$INSTANTLY_CAMPAIGN_ID"