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.
Five lines to your first result
Node 20 or newer. No runtime dependencies, no server to host, no protocol to speak.
$ npm install -g @connectsafely/cli$ export CONNECTSAFELY_API_KEY=your_key_here$ connectsafely list-linkedin-accounts$ connectsafely get-connections --limit 5$ connectsafely skill installThe 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).
86 commands, ten groups
Every command is named after the operation it performs, and that name is identical to the matching MCP tool — so a prompt or runbook written against one works with the other, unchanged.
Account & quota
11Keys, account selection, daily limits, premium status.
Search & sourcing
13People, companies, posts, jobs, groups, schools, geo ids.
Profiles & companies
6Full profiles, firmographics, followers, visitors.
Relationship actions
6Invitations, follows, endorsements, relationship checks.
Inbox & messaging
17Threads, replies, attachments, stars, InMail credits.
Posts & engagement
19Publish, comment, react, repost, scrape, read the feed.
Analytics
6Followers, profile visitors, network summary, own activity.
Groups
3Search groups, pull member lists, send group messages.
Events
1Pull attendee lists off LinkedIn events.
Sales Navigator
4Sales Navigator threads and messaging.
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 load | Size | Roughly |
|---|---|---|
| Every tool definition, loaded upfront (MCP) | 184 KB | ~47,000 tokens |
| The `commands` catalogue — one line each | 13.4 KB | ~3,400 tokens |
| One command's full schema, on demand | 10.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.
$ connectsafely skill installconnectsafelyThe contract every other skill assumes, plus the live catalogue
connectsafely-prospectingPeople, company, job, group and school search; building a lead file
connectsafely-outreachConnection requests, follows, first-touch messages, invitations
connectsafely-inboxConversations, threads, replies, stars, attachments, InMail credits
connectsafely-contentPublishing, media upload, reactions, comments, replies, the feed
connectsafely-analyticsSSI, followers, visitors, network summary, own activity
connectsafely-accountKeys, account selection, quota, auth troubleshooting
connectsafely-sales-navigatorSales 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 casesOne 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.