Salesprompter CLI
The command-line workspace for crawling LinkedIn product markets, turning them into Sales Navigator crawls, and syncing the 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.
The CLI does not have its own separate backend or database. It authenticates through the Salesprompter app and writes into the same shared Salesprompter data plane, scoped to the active workspace selected at login.
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 |
|---|---|---|
| "I sell for Deel and want the right people at similar companies" | start from the product market Deel sells into | salesnav:from-product-category --input deel.com |
| "Find leads at deel.com" | Deel is the target account | account:resolve or leads:generate --domain deel.com |
| "Preview the generated title queries and first splits" | inspect the market crawl before creating jobs | salesnav:from-product-category --input deel.com --dry-run |
| "Generate leads and give me JSON" | agent-oriented execution | add --json to the chosen workflow |
The most important product rule is this:
salesnav:from-product-category --input deel.comtargets the market Deel sells into--domain deel.comtargets Deel itself
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 |
| LinkedIn + Sales Navigator | linkedin-products:scrape, salesnav:from-product-category, salesnav:crawl, salesnav:crawl:status |
| 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
If your user belongs to multiple workspaces, browser login asks which workspace the CLI session should use before it returns to the terminal.
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
Product category to stored Sales Navigator people
node ./dist/cli.js auth:login
node ./dist/cli.js --json salesnav:from-product-category --input deel.com --dry-run
node ./dist/cli.js salesnav:from-product-category --input deel.com
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"