> ## Documentation Index
> Fetch the complete documentation index at: https://talktohumans.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn CLI for AI agents

> The LinkedIn CLI for Claude Code, Codex and other terminal agents

`tth` connects Claude Code, Codex, Cursor or any agent with a terminal to your LinkedIn conversations, network, contacts and drafts. It also runs in scripts and cron jobs.

> [!NOTE]
>
> `tth` never sends a LinkedIn message. It writes drafts, and you review and send them in TalkToHumans.

## Quickstart

```bash theme={null}
# Install (macOS and Linux)
brew install talktohumans/tap/tth

# Sign in (opens a browser)
tth auth login

# List your contacts
tth contacts list --query "Acme"
```

On Windows or without Homebrew, download `tth` from the [latest release](https://github.com/TalkToHumans/linkedin-cli/releases/latest) and put it on your `PATH`.

Any member of a Pro workspace can sign in. Scripts and cron jobs use an [API key](https://talktohumans.app/docs/developers/authentication.md) instead: `export TTH_API_KEY=sk_...`.

## Set up your AI agent

Install the agent skill once:

```bash theme={null}
tth skill --install
```

Or with any skills installer: `npx skills add TalkToHumans/linkedin-cli`.

Then ask in plain words, like the [prompts in our use cases](https://talktohumans.app/docs/product/use-cases/ai-tools.md). Your agent loads the same playbooks as the [MCP](https://talktohumans.app/docs/developers/mcp.md) with `tth skills show`.

## Common commands

```bash theme={null}
# Conversations where you owe a reply
tth conversations list --account-id 42 --filters '[{"field":"conversation.reply_state","operator":"=","value":"waiting_for_my_reply"}]'

# Import profiles and wait for the result
tth contacts import --account-id 42 --file leads.txt --wait

# Enrich and tag a contact
tth contacts enrich --contact-id 123
tth contacts update 123 --tag "Hot lead"

# Draft a message (never sent)
tth drafts write --account-id 42 --contact-id 123 --draft-message "Hi Ada, ..."

# Last week's performance
tth activity summary --from 2026-10-19 --to 2026-10-26
```

Every command supports `--help`, starting with real examples:

```bash theme={null}
tth contacts --help
tth drafts write --help
```

Find your account IDs with `tth accounts list`.

## JSON output for scripting

`tth` prints a table in a terminal and JSON when piped, so it fits in `jq` and shell scripts. `--json` forces JSON, and `--all` fetches every page into one array:

```bash theme={null}
tth conversations list --all | jq length
```

Errors go to stderr. Exit codes: `0` ok, `1` error, `2` usage, `3` not found, `4` auth, plan or setup, `5` rate limited.

## Command groups

| Group | Purpose |
| - | - |
| `auth` | Sign in, check the current workspace, sign out |
| `accounts`, `credits` | Connected LinkedIn accounts and credits |
| `conversations`, `messages`, `drafts` | Read conversations and write drafts |
| `contacts`, `companies` | Find, import, enrich, tag and update contacts |
| `fields`, `tags`, `views` | Custom fields, tags and saved views |
| `templates`, `sequences` | Message templates and follow-up sequences |
| `activity` | Activity and performance reports |
| `skill`, `skills`, `feedback` | Agent skill, playbooks and feedback |
| `api` | Call any `/v1` route of the [API](https://talktohumans.app/docs/developers/overview.md) |

## Use cases to try out

> **[Use with your AI tools](https://talktohumans.app/docs/product/use-cases/ai-tools.md)**
>
> Find contacts, draft outreach, and build team reports with your AI client.

## References

> **[GitHub](https://github.com/TalkToHumans/linkedin-cli)**
>
> Releases, the agent skill and the README.

> **[API Reference](https://talktohumans.app/docs/developers/overview.md)**
>
> Every endpoint the CLI calls.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.