CLI Overview
Architecture
Section titled “Architecture”src/index.ts CLI entry (commander), registers all commandssrc/commands/ One file per subcommandsrc/linkedin/auth/ playwright-auth.ts Headed Chromium login, captures cookiessrc/linkedin/api/ client.ts Axios client with LinkedIn headers + cookie management cookies.ts Cookie jar loading, CSRF token extraction session.ts Session loading endpoints/ conversations.ts List conversations, find by recipient messages.ts Fetch messages, send messages profiles.ts Resolve profile slug and URNsrc/linkedin/realtime/ sse-client.ts SSE stream with reconnect + heartbeatsrc/store/ index.ts Store class (init, git, accounts, conversations) conversations.ts RECORD.json, JSONL messages, symlinks git.ts Debounced git auto-commit search.ts Fuzzy name search with confidence scoringsrc/utils/ rate-limiter.ts Per-account message rate limiter slug.ts Extract slug from LinkedIn URLGlobal flags
Section titled “Global flags”All commands accept these flags:
| Flag | Description |
|---|---|
-a, --account <slug> | Account to use (default: $ALLMAN_ACCOUNT, or the only account) |
-s, --store <path> | Store directory (default: $ALLMAN_STORE, or ./.allman) |
--json | Machine-readable JSON output to stdout |
--debug | Verbose debug output to stderr |
Key concepts
Section titled “Key concepts”Slug resolution
Section titled “Slug resolution”Slugs are LinkedIn publicIdentifier values (e.g. jamie-rivera from linkedin.com/in/jamie-rivera). They are always fetched from the LinkedIn profile API, never guessed from names.
Resolved slugs are cached in RECORD.json and enable O(1) lookups via filesystem symlinks.
Rate limiting
Section titled “Rate limiting”Outbound messages are rate-limited per account. Default: 3000ms minimum between sends. State is persisted to rate-state.json across process restarts.
Pre-send safety
Section titled “Pre-send safety”Before sending, allman send fetches the 10 most recent messages. If new inbound messages arrived since your last reply, the send is aborted and the new messages are shown. This prevents sending without context.
stdout vs stderr
Section titled “stdout vs stderr”allman listen writes NDJSON events to stdout. All informational output, warnings, errors, and debug messages go to stderr. This separation is intentional — agents and pipes read stdout without log noise.