tl cli
ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence from the terminal.
What you can do with it
tl is a thin client over the ThoughtLeaders sponsorship platform. It exposes the same data the internal web app uses — deals, brands, channels, transcripts, view-curves, recommender — to a terminal, and is designed to be driven by AI agents (Claude Code, OpenCode, Gemini, Codex) as well as humans. Typical things teams build on top of it:
For account managers and sales
- Pipeline reporting on the fly. "How many deals did we close in Q1?", "What's my weighted pipeline by sales owner?", "Which proposals are stuck in
pending for more than 14 days?" — one raw SQL or one structured command, instead of waiting on a dashboard.
- Brand intelligence in seconds. "What channels does Nike sponsor?", "Which brands sponsor
MrBeast?", "What's Holafly's sponsorship history through us vs. through everyone?" — answers are one tl db es call away.
- Vetting candidates before a pitch. Look up a channel by ID, name, YouTube URL, or
@handle; pull its adspots, audience demographics, evergreenness score, and detected sponsor history before drafting the IO.
- Pre-flight before booking. Confirm MSN/TPP membership, integration availability, and persona/plan eligibility for a brand profile with one SQL join.
For media buyers and brand-side analysts
- Find channels that look like a known winner.
tl channels similar runs vector similarity over a ~200-dim audience/category profile and ranks candidates by score; tl channels look-alike is the same command under the AM-facing name.
- Discover topical creators without guessing category codes.
tl recommender top-channels "<tag>" ranks channels by how strongly they load on a topic, demographic, or format tag — Cooking, Age 18-24, USA share, etc. Browse valid tag names with tl recommender tags.
- Surface the right channels for a brand.
tl recommender channels-for-brand Nike runs the brand's ideal-audience vector against the channel index and returns the closest unproposed channels.
- Surface the right brands for a channel.
tl recommender brands-for-channel <ref> runs the inverse search — brands most likely to sponsor a given channel, ranked.
For data, finance, and reporting
- Ad-hoc SQL against the production schema.
tl db pg accepts any read-only SELECT (sanitised, capped at 500 rows per page) with the full set of aggregates, window functions, joins, and JSONB operators. tl schema pg [<table>] prints the live column catalogue. tl db fb and tl db es expose Firebolt (time-series view-curves, subscriber growth) and Elasticsearch (transcripts, brand mentions, current channel/video metrics).
- Exports for the spreadsheet on the other side of the conversation.
--csv exports stream straight to a file; --md produces tables you can paste into Slack or a brief; --toon produces a token-efficient encoding for LLM round-trips.
- Saved reports as a contract.
tl reports run <id> re-runs a campaign config someone set up in the web app, so a report that lives in a Slack thread can be a one-command rerun next week.
For AI agents
- Built-in skills install for free.
tl setup claude / opencode / gemini / codex drop ready-made skill files into the right agent directories so the agent answers natural-language questions like "how many deals did we close last quarter?" by composing the right tl db pg|fb|es calls itself.
- Discoverable surface.
tl describe lists every resource and its credit cost; tl describe show <resource> lists fields and filters; tl <command> --help is detailed enough that an agent can plan without external documentation.
- Predictable output shapes. Every command's
--json envelope follows the same {results, total, limit, offset, usage, _breadcrumbs} contract, so an agent can pipe one command's IDs into the next without bespoke parsing.
Requirements
For automated installs on MacOS, prefer installing Python and the requirements on Homebrew and use the pipx package manager, but ask the user if they have the admin access (sudo) password first. If not, proceed by using uv.
Install
As a developer
git clone https://github.com/ThoughtLeaders-io/thoughtleaders-cli.git
cd thoughtleaders-cli
python -m venv .venv
pip install -e .
As a user
# Recommended:
pipx install thoughtleaders-cli
# or
uv tool install thoughtleaders-cli
# or (avoid this — plain `pip` will install into your current environment instead of a fresh venv)
pip install thoughtleaders-cli
Windows with Smart App Control / WDAC