Social Publishing

Goal

Post LinkedIn teasers for published guides from the CLI. Connect your personal LinkedIn once through the web app, optionally grant company-page access, then draft and post teasers with confirmation from the command line.

Use Cases

  • Check LinkedIn connection status from the CLI
  • Draft and review LinkedIn teasers without posting (non-interactive preview)
  • Post teasers to your personal LinkedIn profile with explicit confirmation
  • Post teasers to a LinkedIn company page you administer
  • Auto-post LinkedIn teasers during pulse publication workflow

Prerequisites

  • Authenticated Radar account (radar login for catalog access)
  • LinkedIn personal account connected via web app at https://radar.thalixinc.ai/app
  • Supabase user access JWT exported as RADAR_SUPABASE_ACCESS_TOKEN (the device rdr_ token from radar login will not work for LinkedIn)
  • For company pages: grant company-page access in Account → API and use a page where your LinkedIn member has posting rights

Commands

radar social status

Check LinkedIn connection status. Shows display name, expiration date, and the company pages currently linked to your account.

radar social post <slug>

Draft and post a LinkedIn teaser for the guide. Displays the draft, prompts for confirmation (y/N), then posts to your personal LinkedIn timeline.

radar social post <slug> --to linkedin-company --company <org-id>

Post the teaser to a LinkedIn company page. <org-id> may be a numeric organization id or full urn:li:organization:<id>.

radar social post <slug> --draft-only

Preview the draft teaser without posting. Useful for non-interactive environments or reviewing the teaser before posting.

radar pulse <topic> --post-linkedin

Automatically post a personal LinkedIn teaser after successful pulse article publication. See /docs/pulse for pulse workflow details.

radar pulse <topic> --post-linkedin-company <org-id>

Automatically post to a linked LinkedIn company page after successful pulse publication.

Authentication Model

  • **Catalog/publish operations** use the device-pair rdr_ token from radar login (stored in XDG config ai-coding-radar/credentials.json).
  • **LinkedIn operations** require a Supabase user access JWT (RADAR_SUPABASE_ACCESS_TOKEN). The device rdr_ token is NOT accepted by LinkedIn edge functions.
  • **Connect LinkedIn** in the web app at https://radar.thalixinc.ai/app (one-time OAuth flow).
  • **Grant company-page access** in Account → API. That runs a second OAuth request for LinkedIn organization scopes without disturbing personal posting.
  • Tokens last ~60 days. radar social status will show when reconnect is needed.

Environment Variables

RADAR_SUPABASE_ACCESS_TOKEN

Required for LinkedIn posting. Your Supabase user access JWT (the device rdr_ token from radar login will not work for LinkedIn).

RADAR_SUPABASE_URL

Optional override for Supabase URL. Defaults to public client URL.

RADAR_SUPABASE_ANON_KEY

Optional override for Supabase anon key. Defaults to public client key.

How It Works

**Connect personal LinkedIn** via the web app. Tokens live in public.social_accounts.

**Grant company-page access** when you need organization posting. Radar stores the LinkedIn company pages your member can post as.

**Draft teaser** via radar social post <slug>. The CLI fetches guide metadata and generates an AI-drafted teaser (or falls back to a deterministic teaser if drafting fails).

**Review draft** printed in terminal. Use --draft-only to preview without posting.

**Confirm post** (interactive y/N prompt). Non-interactive mode requires --draft-only.

**Post to LinkedIn** via the Supabase linkedin-post edge function. Personal posts use your member URN; company posts use the selected organization URN.

V1 Scope

  • LinkedIn personal posting remains the baseline path
  • LinkedIn company-page posting is available only for pages imported from the web account page
  • Web app handles OAuth connection, reconnect, and company-page access refresh
  • CLI provides status checks and posting with confirmation for both personal and company targets

Future Extensions

  • Persist company-page access metadata beyond the current imported target list
  • Instagram business accounts (requires Meta review + images)
  • Facebook Page posting (requires Meta app review)
  • X/Twitter posting (API access pending)

Example Session

$ radar social status

LINKEDIN STATUS  Personal connection + company-page targets
✓ LinkedIn connected
  Display name: Alex Chen
  Expires: 2026-10-12T14:23:45.000Z
  Company pages: 1
    - Thalix (5515715)

$ radar social post mcp-reference-servers --to linkedin-company --company 5515715

LINKEDIN POST  Drafting company-page teaser for "MCP Reference Servers"

Draft:
  MCP Reference Servers — A comprehensive guide to Model Context Protocol
  reference servers. Learn how to build and deploy MCP servers for AI agents.
  
  Full breakdown: https://radar.thalixinc.ai/guide/mcp-reference-servers

Link: https://radar.thalixinc.ai/guide/mcp-reference-servers
Target company page: 5515715

Post to LinkedIn company page 5515715? [y/N]: y

Posting to LinkedIn company page 5515715…
✓ Posted to LinkedIn company page
  https://www.linkedin.com/feed/update/urn:li:share:1234567890

$ radar pulse another-topic --post-linkedin-company 5515715

...guide published...
✓ Posted to LinkedIn company page

Implementer Notes

For implementers: see docs/linkedin-social-posting.md for OAuth flow, edge functions, RLS policies, and company-page target refresh behavior.

See Also