@versatly/linkedin-cli
v1.0.0
Published
LinkedIn CLI for posting, commenting, and engagement via Pipedream OAuth
Maintainers
Readme
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-cliPrerequisites
- pdauth installed and configured
- 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 configurationPosts
linkedin post create <text> # Create text post
linkedin post create-image <url> <text> # Create image post
linkedin post delete <postUrn> # Delete a postEngagement
linkedin engage like <postUrl> # Like a post
linkedin engage comment <postUrl> <text> # Comment on post
linkedin engage comments <postUrl> # View commentsProfile
linkedin profile me # Your profile
linkedin profile view <personId> # View someone's profile
linkedin profile picture # Get profile picture URLsOrganizations
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 postingAPI 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:
- Use browser automation
- Have users share post URLs directly
- Use Sales Navigator (separate API access)
Links
- npm: https://www.npmjs.com/package/@versatly/linkedin-cli
- GitHub: https://github.com/Versatly/linkedin-cli
- pdauth: https://www.npmjs.com/package/@versatly/pdauth
License
MIT
