Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lonescale.com/llms.txt

Use this file to discover all available pages before exploring further.

The LoneScale CLI (lonescale) is the official command-line client for the LoneScale Public API. Use it to enrich contacts, source contacts by persona, look up companies, and poll async jobs — all from your terminal or a shell script. It’s a thin wrapper around the same REST endpoints documented under API Reference, with terminal-friendly output, file/stdin/inline input, and built-in polling.

Install

npm install -g @lonescale/cli
Or run without installing:
npx @lonescale/cli --help
Requires Node.js ≥ 18.

Authenticate

Get your API key from Dashboard → Integrations → Public API and provide it in one of three ways (checked in this order):
1

Per-command flag (highest priority)

lonescale enrich --api-key ls_xxx ...
2

Environment variable

export LONESCALE_API_KEY=ls_xxx
lonescale enrich ...
3

Config file

mkdir -p ~/.lonescale
echo '{ "api_key": "ls_xxx" }' > ~/.lonescale/config.json

Get my API key

Commands

CommandPurpose
lonescale enrichWaterfall enrichment (email / phone) for a list of contacts
lonescale sourceSource contacts at a company by persona, seniority, location
lonescale companies searchLook up a single company by name, domain, LinkedIn slug, or ID
lonescale resultPoll the status / result of an async job

Global options

These flags work with every command:
OptionDescription
--api-key <key>LoneScale API key (overrides env + config file)
--output <format>json (default when piped), table (default in TTY), or minimal (just the id/status — script-friendly)
--debugPrint HTTP requests / responses to stderr. API keys are redacted automatically.

Output formats

Data goes to stdout, logs go to stderr — so you can pipe results cleanly into jq, xargs, tee, etc.
# Count returned contacts
lonescale source --domain acme.com --personas p.json --wait --output json \
  | jq '.contacts | length'

# Capture just the job ID
JOB_ID=$(lonescale enrich --type email --contacts c.json --output minimal)
See Recipes for more scripting patterns.