A blazing fast, native command-line tool and agent interface for scraping LinkedIn profiles and posts via Apify. Built in Rust for developers and autonomous AI workflows.
- β‘ Sub-3ms Startup: Compiled as a native static binary with zero runtime dependencies. Executes in ~1β3 ms (compared to ~75 ms for managed runtimes).
- π OS Keystore Integration:
linkedin loginprompts for your token securely and saves it to native OS vaults (macOS Keychain, Linux Secret Service / Keyutils, Windows DPAPI). - π Profile & Post Scraping: Powered by battle-tested Apify actors (
harvestapi~linkedin-profile-scraperandsupreme_coder~linkedin-post). - π― Selective Section Filtering: Slashing LLM token consumption by extracting only the sections you need with
--include. - π€ AI Agent Native: Machine-readable
--jsonoutput, standardized error envelopes with stable numeric exit codes, and explicitllms.txtagent guidance. - π‘οΈ Safety Guardrails: Multi-account management prevents credential collision across environments.
cargo install --git https://github.com/SpaceCorps/Linkedin-Cli --lockedDownload standalone binary archives directly from the GitHub Releases page:
| Platform | Architecture | Binary Package |
|---|---|---|
| macOS | Apple Silicon (aarch64) |
linkedin-v1.0.0-aarch64-apple-darwin.tar.gz |
| macOS | Intel (x86_64) |
linkedin-v1.0.0-x86_64-apple-darwin.tar.gz |
| Linux | x86_64 (musl static) | linkedin-v1.0.0-x86_64-unknown-linux-musl.tar.gz |
| Linux | ARM64 (musl static) | linkedin-v1.0.0-aarch64-unknown-linux-musl.tar.gz |
| Windows | x64 (MSVC) | linkedin-v1.0.0-x86_64-pc-windows-msvc.zip |
Get your API token at Apify and authenticate:
# Interactive login (stores in macOS Keychain, Linux secret-tool, or Windows DPAPI)
linkedin login
# Or set via environment variable
export APIFY_TOKEN=your-token-here
# Or pass per-command
linkedin profile https://www.linkedin.com/in/username --api-key apify_api_xxx# Fetch full profile in YAML
linkedin profile https://www.linkedin.com/in/satyanadella
# Fetch only specific sections
linkedin profile https://www.linkedin.com/in/satyanadella --include experiences,skills,educations
# Output as JSON for scripts or jq
linkedin profile https://www.linkedin.com/in/satyanadella --json | jq '.[0].skills'experiences, skills, educations, languages, licenseAndCertificates, honorsAndAwards, volunteerAndAwards, projects, publications, patents, courses, testScores, organizations, interests, recommendations, updates, profilePicAllDimensions, verifications, promos, highlights, volunteerCauses
# Fetch from update, profile, company, or search URL
linkedin post https://www.linkedin.com/feed/update/urn:li:activity:123456789 --limit 10
# Only include posts newer than date, without comments/likes deep scrape
linkedin post https://www.linkedin.com/company/apple --since 2025-01-01 --no-deeplinkedin me| Command | Description |
|---|---|
linkedin profile <URL> |
Fetch a LinkedIn profile and output as YAML or JSON |
linkedin post <URL> |
Fetch LinkedIn posts (activity, profile, company, or search) |
linkedin me |
Display current authenticated user and token status |
linkedin login [<NAME>] |
Log in and store API key in the native OS keystore |
linkedin accounts add <NAME> |
Add a named account to the keystore |
linkedin accounts list |
List configured accounts (use --check for live status) |
linkedin accounts test <NAME> |
Verify stored credentials for an account |
linkedin accounts remove <NAME> |
Remove account and delete credentials from keystore |
linkedin agent-readme |
Print embedded LLM agent operating manual (--json supported) |
Autonomous LLM agents should start by invoking:
linkedin agent-readme --jsonThis returns structured guidance containing tool metadata, operational rules, and error-to-exit-code mappings.
MIT License. Copyright (c) 2026 SpaceCorps. Original prototype created by Niels Bosma.