Skip to content

skillhq/linkedin

Repository files navigation

LinkedIn CLI

A CLI tool for reading LinkedIn feed, profiles, connections, search results, and messages.

Installation

npm install -g @skillhq/linkedin

Or clone and build from source:

git clone https://github.com/skillhq/linkedin.git
cd linkedin
npm install
npm run build
npm link

Authentication

The CLI uses cookie-based authentication with LinkedIn's Voyager API. You'll need your li_at and JSESSIONID cookies from an active LinkedIn session.

Automatic Cookie Extraction

The CLI can automatically extract cookies from your browser using @steipete/sweet-cookie:

linkedin check                    # Auto-extract from default browser
linkedin check --cookie-source chrome
linkedin check --chrome-profile "Profile 1"

Manual Cookie Setup

  1. Open Chrome DevTools (F12) on linkedin.com
  2. Go to: Application → Cookies → linkedin.com
  3. Copy li_at and JSESSIONID values
  4. Run: linkedin setup --li-at "VALUE" --jsessionid "VALUE"

Commands

Authentication

linkedin check                    # Verify credentials are valid
linkedin whoami                   # Show logged-in user info
linkedin setup                    # Show setup instructions

Reading Data

linkedin feed [-n 20]             # Get home feed posts
linkedin profile <username>       # View a profile by username or URL
linkedin connections [-n 50]      # List your connections
linkedin search "query" [-t type] # Search people, jobs, companies, posts
linkedin inbox [-n 20]            # List message conversations
linkedin read <conversation-id>   # Read messages from a conversation

Options

--json                           # Output in JSON format
--li-at <token>                  # Provide li_at cookie directly
--jsessionid <token>             # Provide JSESSIONID cookie directly
--cookie-source <browser>        # Browser to extract cookies from
--chrome-profile <name>          # Chrome profile name
--timeout <ms>                   # Request timeout in milliseconds

Browser Automation Alternative

LinkedIn aggressively invalidates API sessions. For more reliable access, use browser automation with the Claude chrome extension. See SKILL.md for details.

Development

npm run build    # Build TypeScript
npm run dev      # Watch mode
npm run clean    # Clean dist folder

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors