marketing
LinkedIn CLI for Headless Automation
Use the LinkedIn CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
7 functions 6 read 1 write Manual OAuth token auth
LinkedIn CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The LinkedIn CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# LinkedIn CLI for Headless Automation
kosmokrator integrations:configure linkedin --set access_token="$LINKEDIN_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmo integrations:call linkedin.linkedin_list_posts '{"author":"example_author","count":1,"start":1}' --json Discovery Before Execution
Agents and scripts can inspect LinkedIn docs and schemas before choosing a function.
kosmo integrations:docs linkedin --json
kosmo integrations:docs linkedin.linkedin_list_posts --json
kosmo integrations:schema linkedin.linkedin_list_posts --json
kosmo integrations:search "LinkedIn" --json
kosmo integrations:list --json Useful LinkedIn CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
linkedin.linkedin_list_posts | Read | author, count, start | List LinkedIn UGC posts for an author. Returns post IDs, lifecycle state, and creation timestamps. Use author, count, and start for filtering and pagination. |
linkedin.linkedin_get_post | Read | post_id | Retrieve a LinkedIn UGC post by its ID. Returns the full post including content, lifecycle state, and visibility. |
linkedin.linkedin_create_post | Write | author, text, visibility | Create a new LinkedIn UGC post. Requires an author URN and text content. Returns the created post with its ID and lifecycle state. |
linkedin.linkedin_list_organizations | Read | count, start | List LinkedIn organizations (company pages) the authenticated user has access to. Returns organization IDs, names, and roles. |
linkedin.linkedin_get_organization | Read | organization_id | Retrieve a LinkedIn organization (company page) by its ID. Returns the organization's name, description, website, and other profile data. |
linkedin.linkedin_list_ad_accounts | Read | count, start | List LinkedIn ad accounts the authenticated user has access to. Returns ad account IDs, names, statuses, and currency information. |
linkedin.linkedin_get_current_user | Read | none | Retrieve the currently authenticated LinkedIn user profile. Returns the user's ID, localized name, and profile metadata. Useful for identifying which account or token is in use. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.