Skip to content

Versatly/linkedin-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn CLI

A command-line interface for LinkedIn operations via Pipedream OAuth.

Features

  • Post Management - Create text and image posts, delete posts
  • Engagement - Like posts, add comments, view comments
  • Profile - View your profile, view other profiles
  • Organizations - Search orgs, check admin access, post as org

Installation

npm install -g @versatly/linkedin-cli

Prerequisites

  1. pdauth installed and configured
  2. LinkedIn account connected via pdauth OAuth

Quick Start

# Set your pdauth user ID
linkedin auth set-user telegram:5439689035

# Check connection status
linkedin auth status

# Get your profile
linkedin profile me

# Create a post
linkedin post create "Hello LinkedIn! 🚀"

# Create an image post
linkedin post create-image "https://example.com/image.jpg" "Check out this image!"

# Like a post
linkedin engage like "https://www.linkedin.com/feed/update/urn:li:activity:7123456789"

# Comment on a post
linkedin engage comment "https://www.linkedin.com/posts/..." "Great post!"

Commands

Auth

linkedin auth status           # Check connection status
linkedin auth set-user <id>    # Set pdauth user ID
linkedin auth connect          # Generate OAuth link
linkedin auth clear            # Clear configuration

Posts

linkedin post create <text>              # Create text post
linkedin post create-image <url> <text>  # Create image post
linkedin post delete <postUrn>           # Delete a post

Engagement

linkedin engage like <postUrl>           # Like a post
linkedin engage comment <postUrl> <text> # Comment on post
linkedin engage comments <postUrl>       # View comments

Profile

linkedin profile me                # Your profile
linkedin profile view <personId>   # View someone's profile
linkedin profile picture           # Get profile picture URLs

Organizations

linkedin org search <query>    # Search organizations
linkedin org access            # Check your org admin access
linkedin org admins <orgUrn>   # List org administrators
linkedin org set <orgId>       # Set default org for posting

API Limitations

The LinkedIn API has some limitations:

  • No post search - Cannot search public posts (only your own or org posts you admin)
  • No feed access - Cannot browse the public feed programmatically
  • Rate limits - Standard LinkedIn API rate limits apply

For post search/discovery, you'll need to:

  1. Use browser automation
  2. Have users share post URLs directly
  3. Use Sales Navigator (separate API access)

Links

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published