| name | linkedin-cli-reference |
| description | Complete reference for the linkedin-cli tool. Load this skill when you need to call the CLI via Bash to fetch LinkedIn data, manage connections, or send messages. |
| user-invocable | false |
| allowed-tools | ["Bash"] |
LinkedIn CLI Reference
Complete command reference for linkedin-cli. Use --json on every read command to get machine-readable output.
Rate limits apply: Max 15 calls/minute, 80/day (configurable via config set).
Prerequisites & Installation
Before using any command, ensure the CLI is installed and logged in:
linkedin-cli --help 2>/dev/null
If not found — install:
powershell -Command "irm https://raw.githubusercontent.com/sabania/linkedin-cli/master/install.ps1 | iex"
curl -fsSL https://raw.githubusercontent.com/sabania/linkedin-cli/master/install.sh | bash
git clone https://github.com/sabania/linkedin-cli.git ~/.linkedin-cli-src
cd ~/.linkedin-cli-src && pip install -r requirements.txt
After install, restart terminal if linkedin-cli is not found in PATH.
Check login:
linkedin-cli whoami --json
If not logged in, the CLI will exit with "Not logged in. Run 'linkedin-cli login' first." — inform the user they need to run linkedin-cli login (or login --cookie on headless servers).
Authentication
linkedin-cli login
linkedin-cli login --cookie "<li_at value>"
linkedin-cli whoami --json
Cookie finden: Browser → linkedin.com → DevTools (F12) → Application → Cookies → li_at → Value kopieren.
Profile
linkedin-cli whoami --json
linkedin-cli profile show <public-id> --json
linkedin-cli profile contact <public-id> --json
linkedin-cli profile skills <public-id> --json
linkedin-cli profile experiences <public-id> --json
linkedin-cli profile connections <urn-id> --json
linkedin-cli profile posts <public-id> --limit 5 --json
linkedin-cli profile views --json
linkedin-cli profile network <public-id> --json
Posts
All post commands accept either full URN (urn:li:activity:1234) or just the activity ID (1234).
linkedin-cli posts show <urn> --json
linkedin-cli posts analytics <urn> --json
linkedin-cli posts comments <urn> --limit 10 --json
linkedin-cli posts reactions <urn> --limit 10 --json
linkedin-cli posts engagers <urn> --limit 10 --json
Feed
linkedin-cli feed list --limit 10 --json
Notifications
linkedin-cli notifications list --limit 10 --json
linkedin-cli notifications list --unread --json
Signals (Combined Endpoint)
Aggregates profile views, post engagers, invitations, and notifications in one call.
linkedin-cli signals daily --limit 5 --posts 3 --json
Connections
linkedin-cli connections invitations --limit 10 --json
linkedin-cli connections add <public-id>
linkedin-cli connections add <public-id> --message "Hi, let's connect!"
linkedin-cli connections accept <entity-urn> --secret <shared-secret>
linkedin-cli connections decline <entity-urn> --secret <shared-secret>
linkedin-cli connections remove <public-id>
Search
linkedin-cli search people "software engineer" --limit 10 --json
linkedin-cli search companies "microsoft" --limit 10 --json
linkedin-cli search posts "AI" --limit 10 --json
linkedin-cli search posts "AI" --sort-by "date_posted" --json
linkedin-cli search jobs "python developer" --limit 10 --json
linkedin-cli search groups "data science" --limit 10 --json
linkedin-cli search events "AI conference" --limit 10 --json
Messaging
linkedin-cli messages list --json
linkedin-cli messages read "John Doe" --json
linkedin-cli messages send --conversation <conv-id> --message "Hello!"
linkedin-cli messages send --to <public-id> --message "Hello!"
linkedin-cli messages seen <conv-id>
Company
linkedin-cli company show <company-slug> --json
linkedin-cli company updates <company-slug> --limit 5 --json
linkedin-cli company follow <company-slug>
linkedin-cli company unfollow <company-slug>
Jobs
linkedin-cli jobs show <job-id> --json
linkedin-cli jobs skills <job-id> --json
Config & Rate Limits
linkedin-cli config show
linkedin-cli config set rate_limits.daily_limit 120
linkedin-cli config set rate_limits.calls_per_minute 20
linkedin-cli config set browser.headless false
linkedin-cli config reset
| Setting | Default | Description |
|---|
rate_limits.daily_limit | 80 | Max API calls per day |
rate_limits.calls_per_minute | 15 | Max burst calls per minute |
browser.headless | true | Run Chrome headless (no window) |
Best Practices for Agents
- Always use
--json — structured output is parseable, table output is not
- Use
--limit — fetch only what you need, each call costs rate limit budget
- Prefer
signals daily — one call aggregates views + engagers + invitations + notifications
- Activity ID shorthand —
linkedin-cli posts show 7438407227096539136 works (no full URN needed)
- Check rate limits — if you get
RuntimeError: Daily LinkedIn API limit reached, stop and inform the user
- Never post or send automatically — always show output to user first, let them decide
- Cache results — don't call the same endpoint twice for the same data in one session