Skip to main content

ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence

Project description

tl cli

ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence from the terminal.

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

pipx install thoughtleaders-cli
# or
uv tool install thoughtleaders-cli
# or (but try to avoid it because just "pip" will not create a new venv for the product - only "uv" and "pipx" will do that)
pip install thoughtleaders-cli

Then set up:

tl auth login          # authenticate with ThoughtLeaders
tl setup claude        # install Claude Code plugin (optional)
tl setup opencode      # install OpenCode skill (optional)

Quick Start

# Login
tl auth login

# Query sponsorships
tl sponsorships list status:sold brand:"Nike" purchase-date:2026-01

# Shortcut commands for sponsorship types
tl deals list brand:"Nike"                    # Agreed-upon sponsorships
tl deals list created-at:today                # Deals created today (date keywords: today, yesterday, tomorrow)
tl matches list                               # Possible brand-channel pairings
tl proposals list                             # Matches proposed to both sides

# Show a specific sponsorship
tl sponsorships show 12345

# Search videos (note: this only shows "your" videos)
tl uploads list q:code --csv

# Show upload details (supports colon-containing IDs)
tl uploads show 1174310:0BehkmVa7ak

# Search channels via raw SQL — `tl db pg` against thoughtleaders_channel
# (run `tl schema pg` once to confirm the live column set).
# NOTE: For topic / category discovery, prefer the recommender over
# `content_category` equality — `tl recommender top-channels "<tag>"`
# returns channels ranked by how strongly they load on the topic, not just
# rows where the single category code matches exactly.
tl db pg "SELECT id, channel_name, total_views FROM thoughtleaders_channel
          WHERE content_category = <COOKING_CODE> AND total_views >= 100000
          ORDER BY total_views DESC LIMIT 50 OFFSET 0"
tl db pg "SELECT id, channel_name FROM thoughtleaders_channel
          WHERE is_tl_channel = TRUE LIMIT 200 OFFSET 0"             # all TPP channels (~169)
# MSN status: filter on `media_selling_network_join_date IS [NOT] NULL`
# in the same raw SQL query (column is scrubbed from advertiser sandboxes).

# Show channel detail — accepts numeric ID or channel name.
# Names that match more than one active channel print a candidate list
# and exit; retry with a specific ID.
tl channels show 12345
tl channels show "Economics Explained"

# Find similar channels (recommender, 25 credits, Intelligence plan).
# msn: is tri-state (default msn:yes): yes = MSN only, no = non-MSN only, both = no filter.
# tpp: is tri-state (default tpp:both): yes = TPP only, no = non-TPP only, both = no filter.
# Same ID-or-name resolution rules as `channels show`.
tl channels similar 12345 --limit 10
tl channels similar "Tremending girls" min-score:0.85 --limit 5

# Recommender — discovery by category/demographic tag (Intelligence plan).
# `tags` is free; `top-*`, `inspect-*`, `similar-to-profile`, and `similar-brands-to-channel` cost 25 credits flat.
tl recommender tags                              # List every tag (free)
tl recommender tags cooking                      # Search tag names by substring
tl recommender top-channels "Cooking" msn:yes --limit 50  # Top channels for a tag
tl recommender top-profiles "Cooking" mbn:yes --limit 30  # Top brand profiles (one brand → potentially multiple profiles)
tl recommender top-brands "Cooking" --limit 30            # Top brands (deduped from profiles)
tl recommender inspect-channel 12345             # Per-tag breakdown of a channel's vector
tl recommender inspect-brand Nike                # Per-tag breakdown of a brand's ideal profile
tl recommender similar-to-profile 842            # Channels closest to a brand profile

# Brand intelligence
tl brands show Nike

# Run a saved report
tl reports run 42

# Comments on a sponsorship
tl comments list 12345
tl comments add 12345 "Looks good"

# Show information about the logged-in user
tl whoami

# Check credits
tl balance

Credits

Every data query costs credits based on the type and number of results. Use tl describe to see credit rates and tl balance to check your balance.

tl describe                           # All resources + credit costs
tl describe show sponsorships --filters    # Available filters for sponsorships
tl balance                     # Your credit balance

Terminology

ThoughtLeaders has its internal terminology that's exposed throughout this tool.

  • Brands - Usually companies, sometimes individual products. Brands are the sponsors.
  • Channels - Usually YouTube channels, sometimes podcasts. Channels are creators, they are being sponsored.
  • Sponsorships - Either possible or realised business deals between brands and channels. There are several specific types of sponsorships:
    • Deals - Contractually agreed-upon sponsorships. AKA sold sponsorships. They can be either in a production pipeline or already published / live.
    • Matches - Possible matches between brands and channels, i.e. all pairings that ThoughtLeaders thinks could possibly be right for each other.
    • Proposals - Matches that are actually proposed to both sides to consider.
  • Adspots — types of ads a channel carries (e.g. mention, dedicated video, product placement). Returned by tl channels show; each carries price/cost and computed CPM.

Sponsorships are the centre of attention in ThoughtLeaders - all other analytics and operations serve to produce or optimise sponsorships. Note that the term "Sponsorship" is wide, and can encompass deals that yet need to be approved by either side. There is a funnel of sponsorship types: the pool of Sponsorships is large, the pool of Metches (considered from either Brand or Channel side) is smaller, the pool of Proposals is yet smaller, and the pool of Deals is the smallest.

Integrations

Claude Code Integration

If you use Claude Code, install the plugin for natural language access:

tl setup claude

This registers the ThoughtLeaders marketplace, installs the plugin, and copies skills to ~/.claude/ for short /tl invocation. If the claude binary isn't on PATH, it still installs the standalone skills and prints manual instructions for the plugin.

Using the skills

Talk naturally in Claude Code:

/tl Which channels did we sponsor in Q1?
/tl sold sponsorships for Nike in Q1
/tl show me pending proposals with send dates in April
/tl what channels does Nike sponsor?
/tl check my balance

Resource-specific slash commands:

/tl-sponsorships pending with send dates in April
/tl-reports run my Q1 pipeline
/tl-balance

Updating

tl setup claude                    # re-installs skills and updates plugin

OpenCode Integration

tl setup opencode

This copies the tl skill to ~/.config/opencode/skills/ where OpenCode discovers it automatically. The agent will use it when you ask about sponsorships, deals, channels, or brands.

Output Formats

By default, output is a styled table in the terminal and JSON when piped.

tl sponsorships list status:sold                          # Pretty table
tl sponsorships list status:sold --json                   # JSON
tl sponsorships list status:sold --csv > sponsorships.csv # CSV
tl sponsorships list status:sold --json | jq '.results'   # Pipe to jq

Documentation

  • Architecture & Design — full design doc covering commands, data scoping, credit metering, and server-side API
  • tl describe — discover available resources, fields, filters, and credit costs from the CLI itself
  • tl <command> --help — detailed help for any command

Notes

  • Tested with OpenCode and the nemotron-cascade-2-30b-a3b-i1 local model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thoughtleaders_cli-0.6.8.tar.gz (121.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thoughtleaders_cli-0.6.8-py3-none-any.whl (113.9 kB view details)

Uploaded Python 3

File details

Details for the file thoughtleaders_cli-0.6.8.tar.gz.

File metadata

  • Download URL: thoughtleaders_cli-0.6.8.tar.gz
  • Upload date:
  • Size: 121.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for thoughtleaders_cli-0.6.8.tar.gz
Algorithm Hash digest
SHA256 afdc5c18f3d29ce817aa5a494ced47af1c184ff3446edad54ec3b60c700aa7c5
MD5 c9984ab97fc41983080d79228fed7e5b
BLAKE2b-256 d79b8d0e9939f9de6d2dd772ff5597936cb322a5121d2a9a7cb50cc9e868634a

See more details on using hashes here.

Provenance

The following attestation bundles were made for thoughtleaders_cli-0.6.8.tar.gz:

Publisher: python-publish.yml on ThoughtLeaders-io/thoughtleaders-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thoughtleaders_cli-0.6.8-py3-none-any.whl.

File metadata

File hashes

Hashes for thoughtleaders_cli-0.6.8-py3-none-any.whl
Algorithm Hash digest
SHA256 fa4389c8ff392cc2df2afdbb6722ddb2f7479702edf94f39b9d0e8432554d3a8
MD5 2a05b8638852fd0959a597fe13c71e3d
BLAKE2b-256 6b0ce4f896fb60cb44c08f25b5d1e2e9f6a869df95ee105eeb9479cb53561391

See more details on using hashes here.

Provenance

The following attestation bundles were made for thoughtleaders_cli-0.6.8-py3-none-any.whl:

Publisher: python-publish.yml on ThoughtLeaders-io/thoughtleaders-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page