LINKEDIN CLI

Run LinkedIn from your terminal

86 commands for your own LinkedIn account, as one npm install. No server to host and no protocol to speak — it runs in a terminal, a cron job, a CI pipeline or an AI agent sandbox. Included in the API plan, alongside the REST API and the MCP server.

86 commands, one npm install
Runs anywhere a shell runs
Discovery works offline
Same names as the MCP tools

Five lines to your first result

Node 20 or newer. No runtime dependencies, no server to host, no protocol to speak.

your terminal
$ npm install -g @connectsafely/cli$ export CONNECTSAFELY_API_KEY=your_key_here$ connectsafely list-linkedin-accounts$ connectsafely get-connections --limit 5$ connectsafely skill install

The binary is connectsafely, with csly as a short alias. Get your key on the API key page, or read the package on npm (@connectsafely/cli).

Roughly 8× cheaper per agent session

An MCP client loads every tool definition into the model’s context before it reads your request — all of them, every session, whether or not that session touches LinkedIn at all. The CLI defers it. Measured against the CLI’s own schema output for the full command set:

What you loadSizeRoughly
Every tool definition, loaded upfront (MCP)184 KB~47,000 tokens
The `commands` catalogue — one line each13.4 KB~3,400 tokens
One command's full schema, on demand10.7 KB~2,700 tokens

An agent that browses the catalogue and then reads one schema spends about 6,200 tokens. Loading everything upfront spends 47,000 before the user’s first sentence is processed. On the way back, --fields and --max-items prune the response before any of it enters context.

It teaches your agent how to use it

One command writes 8 skills into .claude/skills/. Claude Code, Cursor and anything else following that convention pick them up automatically. A small always-loaded router carries the live command catalogue and points at exactly one specialist per job.

your terminal
$ connectsafely skill install
connectsafely

The contract every other skill assumes, plus the live catalogue

connectsafely-prospecting

People, company, job, group and school search; building a lead file

connectsafely-outreach

Connection requests, follows, first-touch messages, invitations

connectsafely-inbox

Conversations, threads, replies, stars, attachments, InMail credits

connectsafely-content

Publishing, media upload, reactions, comments, replies, the feed

connectsafely-analytics

SSI, followers, visitors, network summary, own activity

connectsafely-account

Keys, account selection, quota, auth troubleshooting

connectsafely-sales-navigator

Sales Navigator threads and messaging

Built for unattended runs

Rehearse any write

--dry-run shows exactly what a command would send without sending it. There is no equivalent on a tool server.

Pacing is built in, not prompted

Batches leave a randomised 30–90 second gap between writes. Evenly timed bursts are the signal that gets accounts flagged, so the gap is jittered rather than fixed.

Failures you can branch on

Every command returns a real exit code plus a JSON error envelope — so a cron job or CI pipeline can react to a failure instead of parsing prose.

Server-side limits still apply

The same rate limits and daily caps as the rest of ConnectSafely, enforced on our side. A script cannot talk its way past them.

Or skip the commands entirely

55 jobs written as a sentence you say to your assistant — job-change sweeps, post-engagement capture, pre-call briefs, CRM enrichment. Your agent picks the commands; you never type one.

Browse all 55 use cases

One plan, three surfaces

The CLI, the MCP server and the REST API are generated from the same OpenAPI specification and hit the same account, so an endpoint cannot exist in one and be missing from another. They are all in the same plan, from $10/month per LinkedIn account. Pick whichever fits where the work runs — or use all three.

LinkedIn CLI — frequently asked questions

Install, cost, safety, and how the CLI compares to the MCP server.

npm install, and you are done

86 commands against your own LinkedIn account. Seven days free, then $10/month per account — API, MCP and CLI included.