A command-line interface for LinkedIn operations via Pipedream OAuth.
- 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
npm install -g @versatly/linkedin-cli- pdauth installed and configured
- LinkedIn account connected via pdauth OAuth
# 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!"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 configurationlinkedin post create <text> # Create text post
linkedin post create-image <url> <text> # Create image post
linkedin post delete <postUrn> # Delete a postlinkedin engage like <postUrl> # Like a post
linkedin engage comment <postUrl> <text> # Comment on post
linkedin engage comments <postUrl> # View commentslinkedin profile me # Your profile
linkedin profile view <personId> # View someone's profile
linkedin profile picture # Get profile picture URLslinkedin 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 postingThe 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:
- Use browser automation
- Have users share post URLs directly
- Use Sales Navigator (separate API access)
- npm: https://www.npmjs.com/package/@versatly/linkedin-cli
- GitHub: https://github.com/Versatly/linkedin-cli
- pdauth: https://www.npmjs.com/package/@versatly/pdauth
MIT