thoughtleaders-cli 0.5.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- thoughtleaders_cli-0.5.0.dist-info/METADATA +215 -0
- thoughtleaders_cli-0.5.0.dist-info/RECORD +59 -0
- thoughtleaders_cli-0.5.0.dist-info/WHEEL +4 -0
- thoughtleaders_cli-0.5.0.dist-info/entry_points.txt +2 -0
- thoughtleaders_cli-0.5.0.dist-info/licenses/LICENSE +21 -0
- tl_cli/__init__.py +3 -0
- tl_cli/_completions.py +4 -0
- tl_cli/_plugin/.claude-plugin/marketplace.json +17 -0
- tl_cli/_plugin/.claude-plugin/plugin.json +12 -0
- tl_cli/_plugin/agents/tl-analyst.md +66 -0
- tl_cli/_plugin/commands/tl-balance.md +10 -0
- tl_cli/_plugin/commands/tl-brands.md +16 -0
- tl_cli/_plugin/commands/tl-channels.md +31 -0
- tl_cli/_plugin/commands/tl-reports.md +16 -0
- tl_cli/_plugin/commands/tl-sponsorships.md +23 -0
- tl_cli/_plugin/commands/tl.md +28 -0
- tl_cli/_plugin/hooks/hooks.json +26 -0
- tl_cli/_plugin/hooks/scripts/post-usage.sh +26 -0
- tl_cli/_plugin/hooks/scripts/pre-check.sh +30 -0
- tl_cli/_plugin/skills/tl/SKILL.md +413 -0
- tl_cli/_plugin/skills/tl/references/business-glossary.md +159 -0
- tl_cli/_plugin/skills/tl/references/elasticsearch-schema.md +259 -0
- tl_cli/_plugin/skills/tl/references/firebolt-schema.md +208 -0
- tl_cli/_plugin/skills/tl/references/postgres-schema.md +269 -0
- tl_cli/auth/__init__.py +0 -0
- tl_cli/auth/commands.py +49 -0
- tl_cli/auth/login.py +328 -0
- tl_cli/auth/pkce.py +21 -0
- tl_cli/auth/token_store.py +98 -0
- tl_cli/client/__init__.py +0 -0
- tl_cli/client/errors.py +72 -0
- tl_cli/client/http.py +109 -0
- tl_cli/commands/__init__.py +0 -0
- tl_cli/commands/ask.py +54 -0
- tl_cli/commands/balance.py +68 -0
- tl_cli/commands/brands.py +174 -0
- tl_cli/commands/changelog.py +119 -0
- tl_cli/commands/channels.py +291 -0
- tl_cli/commands/comments.py +63 -0
- tl_cli/commands/db.py +104 -0
- tl_cli/commands/deals.py +52 -0
- tl_cli/commands/describe.py +166 -0
- tl_cli/commands/doctor.py +70 -0
- tl_cli/commands/matches.py +69 -0
- tl_cli/commands/proposals.py +69 -0
- tl_cli/commands/reports.py +346 -0
- tl_cli/commands/schema.py +55 -0
- tl_cli/commands/setup.py +401 -0
- tl_cli/commands/snapshots.py +93 -0
- tl_cli/commands/sponsorships.py +193 -0
- tl_cli/commands/uploads.py +84 -0
- tl_cli/commands/whoami.py +206 -0
- tl_cli/config.py +55 -0
- tl_cli/filters.py +88 -0
- tl_cli/hints.py +53 -0
- tl_cli/main.py +209 -0
- tl_cli/output/__init__.py +0 -0
- tl_cli/output/formatter.py +436 -0
- tl_cli/self_update.py +173 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: thoughtleaders-cli
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence
|
|
5
|
+
Project-URL: Homepage, https://thoughtleaders.io
|
|
6
|
+
Project-URL: Repository, https://github.com/ThoughtLeaders-io/thoughtleaders-cli
|
|
7
|
+
Project-URL: Documentation, https://github.com/ThoughtLeaders-io/thoughtleaders-cli/blob/main/docs/architecture.md
|
|
8
|
+
Author-email: ThoughtLeaders <dev@thoughtleaders.io>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: cli,influencer,sponsorship,thoughtleaders
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Topic :: Office/Business
|
|
19
|
+
Requires-Python: >=3.12
|
|
20
|
+
Requires-Dist: authlib>=1.3
|
|
21
|
+
Requires-Dist: httpx>=0.27
|
|
22
|
+
Requires-Dist: keyring>=25.0
|
|
23
|
+
Requires-Dist: rich>=13.0
|
|
24
|
+
Requires-Dist: toon-format>=0.9.0b1
|
|
25
|
+
Requires-Dist: typer[all]>=0.12
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# tl cli
|
|
29
|
+
|
|
30
|
+
ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence from the terminal.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
### As a developer
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
git clone https://github.com/ThoughtLeaders-io/thoughtleaders-cli.git
|
|
38
|
+
cd thoughtleaders-cli
|
|
39
|
+
python -m venv .venv
|
|
40
|
+
pip install -e .
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### As a user
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pipx install git+https://github.com/ThoughtLeaders-io/thoughtleaders-cli.git
|
|
47
|
+
# or
|
|
48
|
+
uv tool install git+https://github.com/ThoughtLeaders-io/thoughtleaders-cli.git
|
|
49
|
+
# 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)
|
|
50
|
+
pip install git+https://github.com/ThoughtLeaders-io/thoughtleaders-cli.git
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Then set up:
|
|
54
|
+
```bash
|
|
55
|
+
tl auth login # authenticate with ThoughtLeaders
|
|
56
|
+
tl setup claude # install Claude Code plugin (optional)
|
|
57
|
+
tl setup opencode # install OpenCode skill (optional)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Quick Start
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Login
|
|
64
|
+
tl auth login
|
|
65
|
+
|
|
66
|
+
# Query sponsorships
|
|
67
|
+
tl sponsorships list status:sold brand:"Nike" purchase-date:2026-01
|
|
68
|
+
|
|
69
|
+
# Shortcut commands for sponsorship types
|
|
70
|
+
tl deals list brand:"Nike" # Agreed-upon sponsorships
|
|
71
|
+
tl deals list created-at:today # Deals created today (date keywords: today, yesterday, tomorrow)
|
|
72
|
+
tl matches list # Possible brand-channel pairings
|
|
73
|
+
tl proposals list # Matches proposed to both sides
|
|
74
|
+
|
|
75
|
+
# Show a specific sponsorship
|
|
76
|
+
tl sponsorships show 12345
|
|
77
|
+
|
|
78
|
+
# Search videos (note: this only shows "your" videos)
|
|
79
|
+
tl uploads list q:code --csv
|
|
80
|
+
|
|
81
|
+
# Show upload details (supports colon-containing IDs)
|
|
82
|
+
tl uploads show 1174310:0BehkmVa7ak
|
|
83
|
+
|
|
84
|
+
# Search channels. msn and tpp are tri-state filters (yes/no/both; default 'both').
|
|
85
|
+
# msn = opted-in to receive sponsorship offers; tpp = exclusively TL-managed.
|
|
86
|
+
# Both are also returned as boolean fields on every channel response.
|
|
87
|
+
tl channels list category:cooking min-subs:100k
|
|
88
|
+
tl channels list msn:yes # MSN channels only (~11k)
|
|
89
|
+
tl channels list tpp:yes # TPP channels only (~169)
|
|
90
|
+
tl channels list msn:no min-subs:500k # big non-MSN channels
|
|
91
|
+
|
|
92
|
+
# Show channel detail — accepts numeric ID or channel name.
|
|
93
|
+
# Names that match more than one active channel print a candidate list
|
|
94
|
+
# and exit; retry with a specific ID.
|
|
95
|
+
tl channels show 12345
|
|
96
|
+
tl channels show "Economics Explained"
|
|
97
|
+
|
|
98
|
+
# Find similar channels (vector recommender, 50 credits, Intelligence plan).
|
|
99
|
+
# msn: is tri-state (default msn:yes): yes = MSN only, no = non-MSN only, both = no filter.
|
|
100
|
+
# tpp: is tri-state (default tpp:both): yes = TPP only, no = non-TPP only, both = no filter.
|
|
101
|
+
# Same ID-or-name resolution rules as `channels show`.
|
|
102
|
+
tl channels similar 12345 --limit 10
|
|
103
|
+
tl channels similar "Tremending girls" min-score:0.85 --limit 5
|
|
104
|
+
|
|
105
|
+
# Brand intelligence
|
|
106
|
+
tl brands show Nike
|
|
107
|
+
|
|
108
|
+
# Run a saved report
|
|
109
|
+
tl reports run 42
|
|
110
|
+
|
|
111
|
+
# Comments on a sponsorship
|
|
112
|
+
tl comments list 12345
|
|
113
|
+
tl comments add 12345 "Looks good"
|
|
114
|
+
|
|
115
|
+
# Show information about the logged-in user
|
|
116
|
+
tl whoami
|
|
117
|
+
|
|
118
|
+
# Check credits
|
|
119
|
+
tl balance
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Credits
|
|
123
|
+
|
|
124
|
+
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.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
tl describe # All resources + credit costs
|
|
128
|
+
tl describe show sponsorships --filters # Available filters for sponsorships
|
|
129
|
+
tl balance # Your credit balance
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
# Terminology
|
|
133
|
+
|
|
134
|
+
ThoughtLeaders has its internal terminology that's exposed throughout this tool.
|
|
135
|
+
|
|
136
|
+
* **Brands** - Usually companies, sometimes individual products. Brands are the sponsors.
|
|
137
|
+
* **Channels** - Usually YouTube channels, sometimes podcasts. Channels are creators, they are being sponsored.
|
|
138
|
+
* **Sponsorships** - Either possible or realised business deals between brands and channels. There are several specific types of sponsorships:
|
|
139
|
+
* *Deals* - Contractually agreed-upon sponsorships. AKA sold sponsorships. They can be either in a production pipeline or already published / live.
|
|
140
|
+
* *Matches* - Possible matches between brands and channels, i.e. all pairings that ThoughtLeaders thinks could possibly be right for each other.
|
|
141
|
+
* *Proposals* - Matches that are actually proposed to both sides to consider.
|
|
142
|
+
- **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.
|
|
143
|
+
|
|
144
|
+
Sponsorships are the centre of attention in ThoughtLeaders - all other analytics and operations serve to produce or optimise sponsorships.
|
|
145
|
+
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
|
|
146
|
+
sponsorship types: the pool of Sponsorships is large, the pool of Metches (considered from either Brand or Channel side) is smaller,
|
|
147
|
+
the pool of Proposals is yet smaller, and the pool of Deals is the smallest.
|
|
148
|
+
|
|
149
|
+
# Integrations
|
|
150
|
+
|
|
151
|
+
## Claude Code Integration
|
|
152
|
+
|
|
153
|
+
If you use Claude Code, install the plugin for natural language access:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
tl setup claude
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
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.
|
|
160
|
+
|
|
161
|
+
### Using the skills
|
|
162
|
+
|
|
163
|
+
Talk naturally in Claude Code:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
/tl Which channels did we sponsor in Q1?
|
|
167
|
+
/tl sold sponsorships for Nike in Q1
|
|
168
|
+
/tl show me pending proposals with send dates in April
|
|
169
|
+
/tl what channels does Nike sponsor?
|
|
170
|
+
/tl check my balance
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Resource-specific slash commands:
|
|
174
|
+
```
|
|
175
|
+
/tl-sponsorships pending with send dates in April
|
|
176
|
+
/tl-channels cooking channels over 100k subscribers
|
|
177
|
+
/tl-brands Nike
|
|
178
|
+
/tl-reports run my Q1 pipeline
|
|
179
|
+
/tl-balance
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Updating
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
tl setup claude # re-installs skills and updates plugin
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## OpenCode Integration
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
tl setup opencode
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
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.
|
|
195
|
+
|
|
196
|
+
## Output Formats
|
|
197
|
+
|
|
198
|
+
By default, output is a styled table in the terminal and JSON when piped.
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
tl sponsorships list status:sold # Pretty table
|
|
202
|
+
tl sponsorships list status:sold --json # JSON
|
|
203
|
+
tl sponsorships list status:sold --csv > sponsorships.csv # CSV
|
|
204
|
+
tl sponsorships list status:sold --json | jq '.results' # Pipe to jq
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Documentation
|
|
208
|
+
|
|
209
|
+
- [Architecture & Design](docs/architecture.md) — full design doc covering commands, data scoping, credit metering, and server-side API
|
|
210
|
+
- `tl describe` — discover available resources, fields, filters, and credit costs from the CLI itself
|
|
211
|
+
- `tl <command> --help` — detailed help for any command
|
|
212
|
+
|
|
213
|
+
# Notes
|
|
214
|
+
|
|
215
|
+
* Tested with OpenCode and the `nemotron-cascade-2-30b-a3b-i1` local model.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
tl_cli/__init__.py,sha256=bguKIARDylFfGSBlrE9gEnztZdCc_rALTrDcaBeS4wE,112
|
|
2
|
+
tl_cli/_completions.py,sha256=kOyEUqC26vbYvyXWi513WX8fF73qQLR5WWuRSe_wqyk,164
|
|
3
|
+
tl_cli/config.py,sha256=teQF2Smk38AFkrkaUnR0peo-CPy5CMIKiNoA0D5R9jQ,1945
|
|
4
|
+
tl_cli/filters.py,sha256=jymgt21vl2d67yTXD_ceRIxTn6H6OYI5-QvQyE4Y4z0,2937
|
|
5
|
+
tl_cli/hints.py,sha256=cT8kuDtkAZqwXkc2RV0Yg_abofK-g9UiXwTTBunX78U,1557
|
|
6
|
+
tl_cli/main.py,sha256=EK3DZ0EwI2qSwXZyDOTuZh5K2rfe0jI5Wo-HWy82KK8,6924
|
|
7
|
+
tl_cli/self_update.py,sha256=elLAH5gBOY00COWbSq5G6iwFx3e-59heKKWFrnAbQDg,5438
|
|
8
|
+
tl_cli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
tl_cli/auth/commands.py,sha256=uf4grUdpPnY-oUBUNHJQVW30eCFBguwVm1mGwgwPX2Q,1589
|
|
10
|
+
tl_cli/auth/login.py,sha256=6Jhfw7_eXGxZvUfNP33AZPRmnqmu_scvgt4AcOydsrE,10665
|
|
11
|
+
tl_cli/auth/pkce.py,sha256=4Q6Ip-TeZFNG9c3swXNi4gH7mdMkltKa62gZZNybt8U,658
|
|
12
|
+
tl_cli/auth/token_store.py,sha256=ZASTs8qllxu1cmkphQThq9NHSYN0dadZje1rEDquc18,2673
|
|
13
|
+
tl_cli/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
tl_cli/client/errors.py,sha256=PxHZv0O6zvaHZeKh3TTAXziX7WOJB_hhGOp72nxakX0,2531
|
|
15
|
+
tl_cli/client/http.py,sha256=65Df8B9EjIod_Yv2p2dMxROHSejCJll7NsfSCxerZHg,3763
|
|
16
|
+
tl_cli/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
+
tl_cli/commands/ask.py,sha256=dRt2H80MCzKB-EYYRFJMpr6gA798NE9Qlsi5D6kODII,2062
|
|
18
|
+
tl_cli/commands/balance.py,sha256=2cWQIktn_EYvGc3qDhKF-qrun857_6AYOzDxvowsjl0,2091
|
|
19
|
+
tl_cli/commands/brands.py,sha256=W-J7FdSqwNudWLTRHZ8k7QMIIJxdXVVoZSuj9R9_8zM,6638
|
|
20
|
+
tl_cli/commands/changelog.py,sha256=D1PtDdHpawTlWqUHjKzVmv9yXLSU915UVmI3dZzEwyA,4241
|
|
21
|
+
tl_cli/commands/channels.py,sha256=637rJX_vjK-G8HRZ2m0oESmmLotxB7dpChxFyDn2zwI,12494
|
|
22
|
+
tl_cli/commands/comments.py,sha256=AgpnLtB7RYgc1grWWHPV51kI44BE2JdTlpOmtnPwFeY,2059
|
|
23
|
+
tl_cli/commands/db.py,sha256=XpP6OE43puZrGILfspoRyVXpKPdteztJE2aySD9DJOI,4030
|
|
24
|
+
tl_cli/commands/deals.py,sha256=9-boF_HVO6xQ5ULPxatWRxbCIwMjzKCbCUb12tEwAe0,2093
|
|
25
|
+
tl_cli/commands/describe.py,sha256=QjTTdAxG7eWV5Z8jNkonikZ-5ScWOZ8NO5_xYublxUY,5527
|
|
26
|
+
tl_cli/commands/doctor.py,sha256=UWLdlb041s3qbwW9OMgtQrEuaAu8j_SrKl5nUDLnYAU,2297
|
|
27
|
+
tl_cli/commands/matches.py,sha256=C4_kWRpTGu2lduDmrFpgi-D0Q4MuPc_3Cc76Ud2_i1g,2805
|
|
28
|
+
tl_cli/commands/proposals.py,sha256=MWohD2UdEVRIVzYX-5uKlKE8U56nQu4OJMHbiaXuM_s,2837
|
|
29
|
+
tl_cli/commands/reports.py,sha256=mgpg_sSNfAkDD40NI32wJH2-HGSwU2gryUhGYLTXB0Y,12849
|
|
30
|
+
tl_cli/commands/schema.py,sha256=pMCVmX_v0HuCnLiJzAG0RZqmrKEo2g2uH8YcUid7kQw,1511
|
|
31
|
+
tl_cli/commands/setup.py,sha256=tlU4UyTD0MJOK4mKTq5jOepdPIF2r3cqf5RWkP-9wXM,15180
|
|
32
|
+
tl_cli/commands/snapshots.py,sha256=7zl8iQhKqmGSVXKOP39Q1jZV8N1boy7cQoKQHLJ_ROE,3347
|
|
33
|
+
tl_cli/commands/sponsorships.py,sha256=uECLoX4AvUAaGBQDeUNu4EtGr3vGH_sv1pVwAUcFrv4,6981
|
|
34
|
+
tl_cli/commands/uploads.py,sha256=Vtm9VO-PSwZBhFlTemFf1OEVhXJEc1AevT5HhWemYos,3179
|
|
35
|
+
tl_cli/commands/whoami.py,sha256=HL_0X0hWI-NsmWfjgy0mhWO3TNdWztt_AAlWRJysyVk,7342
|
|
36
|
+
tl_cli/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
+
tl_cli/output/formatter.py,sha256=9NjUVUlCr17lizMIiV98vvDSFgY9ZZ5bHDlqAYvrhNI,15137
|
|
38
|
+
tl_cli/_plugin/.claude-plugin/marketplace.json,sha256=l56PMmyjfGXNGlV30wRyOAe74B6gJNCVNCxgsBbSNxc,446
|
|
39
|
+
tl_cli/_plugin/.claude-plugin/plugin.json,sha256=V9ojf_hNDdxmF0QEDMwFZLV-NX6L4jojKMnJZOwyPvU,466
|
|
40
|
+
tl_cli/_plugin/agents/tl-analyst.md,sha256=bcmtgkOIaFe4uOsdIxStbruvBsEX9vNvgoDZUsGpOQU,3830
|
|
41
|
+
tl_cli/_plugin/commands/tl-balance.md,sha256=0sQjVBu1xZXmzoTBqFZF8MhYAsuc9F7Vci23nbTDZ9Q,204
|
|
42
|
+
tl_cli/_plugin/commands/tl-brands.md,sha256=FxZadL5utdJOrko0gl9HmVBvTDgVV1B2YzsBtjRWvwM,543
|
|
43
|
+
tl_cli/_plugin/commands/tl-channels.md,sha256=B-vbF83rxW0S1PDwpU22SyoXGdfhQ1y6b_31Z8x5zIw,2207
|
|
44
|
+
tl_cli/_plugin/commands/tl-reports.md,sha256=uB1u9gvcSSgxsXEPfHvT1iZjSxm-jH63nUbs_wsS5_o,511
|
|
45
|
+
tl_cli/_plugin/commands/tl-sponsorships.md,sha256=8vm4qUWWy1A3n1t3fvLMLjNvgirI-6M3FifSjH3Gn3g,1259
|
|
46
|
+
tl_cli/_plugin/commands/tl.md,sha256=qh1rnqSo7PJeFathrEOyk67XtvYqtz_vIw81nw5yd3w,1335
|
|
47
|
+
tl_cli/_plugin/hooks/hooks.json,sha256=lU4w5iZGSnVJ1sZn18kbJGh2s-iOvG3TtAXmiVK61mE,476
|
|
48
|
+
tl_cli/_plugin/hooks/scripts/post-usage.sh,sha256=WVvZLkZik6lbeZ20Kh-wgm4JkRFHFN0Uwl4C8S3Y0sY,759
|
|
49
|
+
tl_cli/_plugin/hooks/scripts/pre-check.sh,sha256=E9KeuXy6yeHEBOnOFW4hDW-Et-Dbp1Oh--3WXKfOX78,898
|
|
50
|
+
tl_cli/_plugin/skills/tl/SKILL.md,sha256=CE2XqRWnpCttlIIv3jDP9oCPLgZREGq6vSeuUrZNAxM,30437
|
|
51
|
+
tl_cli/_plugin/skills/tl/references/business-glossary.md,sha256=PNQIxpIZ0zIxb3nHnvPeKUSFpjvnm4Q-950nQkNkfUM,7598
|
|
52
|
+
tl_cli/_plugin/skills/tl/references/elasticsearch-schema.md,sha256=c7zFBj3PHweyw7AhrV_-Fy0GAxz9aralWdDSC16yd_s,10713
|
|
53
|
+
tl_cli/_plugin/skills/tl/references/firebolt-schema.md,sha256=WocgEZSoa6phbbuWT49FsGPCWliq1QvA0hC_J0u6vcc,10043
|
|
54
|
+
tl_cli/_plugin/skills/tl/references/postgres-schema.md,sha256=cBTclNLCh15MWVDRKM9VCLX7WVgfKk_bLxJrFEkheSQ,10677
|
|
55
|
+
thoughtleaders_cli-0.5.0.dist-info/METADATA,sha256=oPYYQNkITzBs4kKB6EAc5Ln-668-qOx2TguAy3bV6vA,7989
|
|
56
|
+
thoughtleaders_cli-0.5.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
57
|
+
thoughtleaders_cli-0.5.0.dist-info/entry_points.txt,sha256=umZp-1BkGkHDG0bNZXpTXrjwW0HGf9IDFN40eAWuuvg,39
|
|
58
|
+
thoughtleaders_cli-0.5.0.dist-info/licenses/LICENSE,sha256=RUfdfLsn6jygiyrnnVUHt6r4IPwr2rbDm9Kixgtu8fo,1071
|
|
59
|
+
thoughtleaders_cli-0.5.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ThoughtLeaders
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
tl_cli/__init__.py
ADDED
tl_cli/_completions.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "thoughtleaders-plugins",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "ThoughtLeaders",
|
|
5
|
+
"email": "dev@thoughtleaders.io"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "ThoughtLeaders CLI plugin for Claude Code — query sponsorship data from the terminal"
|
|
9
|
+
},
|
|
10
|
+
"plugins": [
|
|
11
|
+
{
|
|
12
|
+
"name": "tl-cli",
|
|
13
|
+
"source": "./",
|
|
14
|
+
"description": "ThoughtLeaders CLI — query sponsorship deals, channels, brands, uploads, and intelligence"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tl-cli",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "ThoughtLeaders CLI — query sponsorship deals, channels, brands, uploads, and intelligence from the terminal",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "ThoughtLeaders",
|
|
7
|
+
"email": "dev@thoughtleaders.io"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://docs.thoughtleaders.io/cli",
|
|
10
|
+
"repository": "https://github.com/ThoughtLeaders-io/thoughtleaders-cli",
|
|
11
|
+
"keywords": ["thoughtleaders", "sponsorship", "influencer", "data", "cli"]
|
|
12
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl-analyst
|
|
3
|
+
description: Use when the user asks to analyze, compare, investigate, or summarize ThoughtLeaders data across multiple dimensions. Chains tl CLI commands to answer complex questions that require multiple queries, cross-referencing, or aggregation. Triggers on "analyze", "compare", "investigate", "deep dive", "cross-reference", "trend", "correlation".
|
|
4
|
+
tools: [Bash, Read]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TL Data Analyst Agent
|
|
8
|
+
|
|
9
|
+
You are an autonomous data analyst for ThoughtLeaders. You chain multiple `tl` CLI commands to answer complex questions that require cross-referencing, aggregation, or multi-step reasoning.
|
|
10
|
+
|
|
11
|
+
## Before Starting Any Analysis
|
|
12
|
+
|
|
13
|
+
1. **Check auth**: `tl auth status`
|
|
14
|
+
2. **Check balance**: `tl balance --json` — estimate total cost for your planned queries
|
|
15
|
+
3. **Discover schema**: `tl describe show <resource> --json` for each resource you'll query
|
|
16
|
+
4. **Check saved reports**: `tl reports --json` — a saved report might already answer the question
|
|
17
|
+
|
|
18
|
+
If estimated cost > 200 credits, ask the user to confirm before proceeding.
|
|
19
|
+
|
|
20
|
+
## Analysis Patterns
|
|
21
|
+
|
|
22
|
+
### Multi-step research
|
|
23
|
+
"Find channels similar to the ones Nike sponsors and compare their pricing"
|
|
24
|
+
1. `tl brands show Nike --json` → extract initial channel IDs from mentions
|
|
25
|
+
2. `tl channels similar <initial-id> --json --limit 20` for each top initial channel → one 50-credit call per initial, returns enriched rows with subscribers / impression / cpm. The `msn:` filter is tri-state with default `msn:yes` (MSN channels only): use `msn:both` to broaden to all, or `msn:no` for non-MSN only. Ambiguous name arguments return 400 with candidates.
|
|
26
|
+
3. Union + dedupe, then compile comparison table by cpm / subscribers.
|
|
27
|
+
|
|
28
|
+
### Cross-resource analysis
|
|
29
|
+
"Show me deal slippage this month"
|
|
30
|
+
1. `tl sponsorships list status:pending send-date-end:2026-03-31 --json`
|
|
31
|
+
2. Identify sponsorships with past send dates that aren't sold
|
|
32
|
+
3. Present findings, suggest `tl comments add` for each
|
|
33
|
+
|
|
34
|
+
### Report comparison
|
|
35
|
+
"Compare Q1 to Q4 performance"
|
|
36
|
+
1. `tl reports --json` → find relevant report ID
|
|
37
|
+
2. `tl reports run <id> --since 2026-01-01 --until 2026-03-31 --json`
|
|
38
|
+
3. `tl reports run <id> --since 2025-10-01 --until 2025-12-31 --json`
|
|
39
|
+
4. Compute deltas and trends
|
|
40
|
+
|
|
41
|
+
### Discovery workflows
|
|
42
|
+
"What's our best performing brand this quarter?"
|
|
43
|
+
1. `tl deals list purchase-date-start:2026-01-01 --json` → aggregate revenue by brand
|
|
44
|
+
2. `tl brands show <top_brand> --json` → sponsorship intelligence
|
|
45
|
+
3. `tl snapshots channel <id> --json` → performance metrics for top channels
|
|
46
|
+
|
|
47
|
+
### Channel deep dive
|
|
48
|
+
"Give me a full picture of channel 12345"
|
|
49
|
+
1. `tl channels show 12345 --json` → profile, scores, and demographics
|
|
50
|
+
2. `tl snapshots channel 12345 --json` → growth over time
|
|
51
|
+
3. `tl deals list channel:12345 --json` → deal history
|
|
52
|
+
4. `tl uploads list channel:12345 --json` → recent content
|
|
53
|
+
|
|
54
|
+
### Demographics screenshots check
|
|
55
|
+
"Does channel X have demographics screenshots uploaded?"
|
|
56
|
+
1. `tl channels show <id-or-name> --json` → check `demographics_updated_at` field
|
|
57
|
+
2. If non-null, screenshots are on file (the timestamp shows when they were last processed via OCR). If null, no screenshots have been uploaded for this channel.
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- **Always resolve numeric codes to human-readable labels** in your output. Never show "Status 3" — show "Sold". Status mapping: 0=Proposed, 1=Unavailable, 2=Pending, 3=Sold, 4=Rejected by Advertiser, 5=Rejected by Publisher, 6=Proposal Approved, 7=Matched, 8=Reached Out, 9=Rejected by Agency.
|
|
62
|
+
- Always use `--json` for output you need to parse
|
|
63
|
+
- Always include `--limit` on list queries to control credit spend
|
|
64
|
+
- For `tl snapshots video`, always include `--channel` (required for Firebolt performance)
|
|
65
|
+
- Present final results as a clear summary with tables when appropriate
|
|
66
|
+
- Show total credits consumed at the end of your analysis
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl-brands
|
|
3
|
+
description: Brand intelligence lookup. Research a brand's sponsorship activity and channel mentions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tl-brands — Brand Intelligence
|
|
7
|
+
|
|
8
|
+
The user wants to research a brand's sponsorship activity. Requires Intelligence plan.
|
|
9
|
+
|
|
10
|
+
1. Run `tl describe show brands --json` to discover filters
|
|
11
|
+
2. Translate the user's request into a `tl brands show` command
|
|
12
|
+
3. Execute and present results
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- "/tl-brands Nike" → `tl brands show Nike`
|
|
16
|
+
- "/tl-brands Nike on channel 12345" → `tl brands show Nike --channel 12345`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl-channels
|
|
3
|
+
description: Channel search and lookup. Find YouTube channels by category, subscribers, language, or other criteria.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tl-channels — Channel Search
|
|
7
|
+
|
|
8
|
+
The user wants to search or look up YouTube channels.
|
|
9
|
+
|
|
10
|
+
1. Run `tl describe show channels --json` to discover filters
|
|
11
|
+
2. Translate the user's request into a `tl channels` command
|
|
12
|
+
3. Execute and present results
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- "/tl-channels cooking channels over 100k" → `tl channels list category:cooking min-subs:100000`
|
|
16
|
+
- "/tl-channels 12345" → `tl channels show 12345`
|
|
17
|
+
- "/tl-channels English gaming channels" → `tl channels list category:gaming language:en`
|
|
18
|
+
- "/tl-channels mobile-first channels" → `tl channels list primary-device:mobile`
|
|
19
|
+
- "/tl-channels channels with majority US audience" → `tl channels list min-us-share:50`
|
|
20
|
+
- "/tl-channels mobile tech channels with US focus" → `tl channels list category:tech primary-device:mobile min-us-share:60`
|
|
21
|
+
- "/tl-channels channels similar to 12345" → `tl channels similar 12345 --limit 10`
|
|
22
|
+
- "/tl-channels look-alikes for Economics Explained at high similarity" → `tl channels similar "Economics Explained" min-score:0.85 --limit 10`
|
|
23
|
+
- "/tl-channels look-alikes including non-MSN" → `tl channels similar 12345 msn:both --limit 20`
|
|
24
|
+
- "/tl-channels look-alikes that are non-MSN only" → `tl channels similar 12345 msn:no --limit 20`
|
|
25
|
+
- "/tl-channels TPP look-alikes for 12345" → `tl channels similar 12345 tpp:yes --limit 20`
|
|
26
|
+
- "/tl-channels all TPP channels in cooking" → `tl channels list tpp:yes category:cooking`
|
|
27
|
+
- "/tl-channels channels that are NOT in TPP" → `tl channels list tpp:no`
|
|
28
|
+
- "/tl-channels MSN gaming channels" → `tl channels list msn:yes category:gaming`
|
|
29
|
+
- "/tl-channels non-MSN channels with 500k+ subs" → `tl channels list msn:no min-subs:500000`
|
|
30
|
+
|
|
31
|
+
Note: `tl channels list` and `tl channels similar` both support tri-state `msn:` and `tpp:` filters (`yes` / `no` / `both`). Defaults: `msn:yes` on `similar`, `msn:both` on `list`; `tpp:both` on both. Both values are also returned as boolean fields (`msn`, `tpp`) on every channel response — list, detail, and similar. Ambiguous name arguments return a 400 with candidate IDs listed.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl-reports
|
|
3
|
+
description: List and run saved reports. View your organization's saved reports and execute them.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tl-reports — Saved Reports
|
|
7
|
+
|
|
8
|
+
The user wants to see or run their saved reports.
|
|
9
|
+
|
|
10
|
+
1. Run `tl reports --json` to list saved reports
|
|
11
|
+
2. Present the list with IDs and titles
|
|
12
|
+
3. If the user specifies a report, run it with `tl reports run <id> --json`
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
- "/tl-reports" → `tl reports`
|
|
16
|
+
- "/tl-reports run my Q1 pipeline" → list reports, find matching one, `tl reports run <id>`
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl-sponsorships
|
|
3
|
+
description: Quick sponsorship lookup. Query, filter, or show details for sponsorships.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tl-sponsorships — Sponsorship Lookup
|
|
7
|
+
|
|
8
|
+
The user wants to query sponsorships.
|
|
9
|
+
|
|
10
|
+
1. Run `tl describe sponsorships --json` to discover filters
|
|
11
|
+
2. Translate the user's request into a `tl sponsorships` command
|
|
12
|
+
3. Execute and present results
|
|
13
|
+
|
|
14
|
+
If no specific request is given, run `tl sponsorships list --limit 10` to show recent sponsorships.
|
|
15
|
+
|
|
16
|
+
Examples:
|
|
17
|
+
- "/tl-sponsorships pending with send dates in April" → `tl sponsorships list status:pending send-date:2026-04`
|
|
18
|
+
- "/tl-sponsorships Nike" → `tl sponsorships list brand:"Nike"`
|
|
19
|
+
- "/tl-sponsorships sold deals on mobile-first channels" → `tl sponsorships list status:sold primary-device:mobile`
|
|
20
|
+
- "/tl-sponsorships deals on channels with majority US audience" → `tl sponsorships list min-us-share:50`
|
|
21
|
+
- "/tl-sponsorships 12345" → `tl sponsorships show 12345`
|
|
22
|
+
|
|
23
|
+
`tl sponsorships show <id> --json` returns extended detail fields beyond the list view, including: `impressions_guarantee`, `integration`, `publish_count`, `common_name`, `outreach_email`, nested `publisher` (first_name/last_name/email), nested `brand_contact` (first_name/last_name/email), and `brand.organization_name`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tl
|
|
3
|
+
description: Smart router for ThoughtLeaders data queries. Translates your request into the right tl CLI command(s).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /tl — ThoughtLeaders Query Router
|
|
7
|
+
|
|
8
|
+
The user wants to query ThoughtLeaders data. Translate their request into the right `tl` CLI command.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. Identify which resource(s) the request is about (sponsorships, deals, channels, brands, uploads, snapshots, reports)
|
|
13
|
+
2. Run `tl describe show <resource> --json` to discover available filters
|
|
14
|
+
3. Translate the user's natural language into a `tl` command with appropriate filters
|
|
15
|
+
4. Execute the command
|
|
16
|
+
5. Present results clearly
|
|
17
|
+
|
|
18
|
+
## Examples
|
|
19
|
+
|
|
20
|
+
- "/tl sold sponsorships for Nike in Q1" → `tl sponsorships list status:sold brand:"Nike" purchase-date-start:2026-01-01 purchase-date-end:2026-03-31`
|
|
21
|
+
- "/tl cooking channels over 100k subs" → `tl channels list category:cooking min-subs:100000`
|
|
22
|
+
- "/tl mobile-first US cooking channels" → `tl channels list category:cooking primary-device:mobile min-us-share:50`
|
|
23
|
+
- "/tl Nike's sponsorship activity" → `tl brands show Nike`
|
|
24
|
+
- "/tl run my Q1 report" → `tl reports --json` then `tl reports run <id>`
|
|
25
|
+
- "/tl check my balance" → `tl balance`
|
|
26
|
+
- "/tl show sponsorship 12345" → `tl sponsorships show 12345`
|
|
27
|
+
|
|
28
|
+
If the request is complex and requires multiple queries, delegate to the tl-analyst agent.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PreToolUse": [
|
|
3
|
+
{
|
|
4
|
+
"matcher": "Bash",
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "command",
|
|
8
|
+
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/pre-check.sh",
|
|
9
|
+
"timeout": 10
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"PostToolUse": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "Bash",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/post-usage.sh",
|
|
21
|
+
"timeout": 5
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PostToolUse hook: warn on low credits after tl commands.
|
|
3
|
+
|
|
4
|
+
COMMAND="${TOOL_INPUT_command:-}"
|
|
5
|
+
OUTPUT="${TOOL_OUTPUT:-}"
|
|
6
|
+
|
|
7
|
+
# Only act on tl commands
|
|
8
|
+
if [[ ! "$COMMAND" =~ ^tl[[:space:]] ]]; then
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Check for 402 (insufficient credits)
|
|
13
|
+
if [[ "$OUTPUT" =~ "402" ]] || [[ "$OUTPUT" =~ "Insufficient credits" ]]; then
|
|
14
|
+
echo "WARN: Credits exhausted. Deposit more at https://app.thoughtleaders.io/settings/billing" >&2
|
|
15
|
+
exit 0
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
# Check for low balance in JSON output
|
|
19
|
+
if [[ "$OUTPUT" =~ \"balance_remaining\"[[:space:]]*:[[:space:]]*([0-9]+) ]]; then
|
|
20
|
+
BALANCE="${BASH_REMATCH[1]}"
|
|
21
|
+
if [[ "$BALANCE" -lt 500 ]]; then
|
|
22
|
+
echo "WARN: Low credit balance ($BALANCE remaining). Consider depositing more credits." >&2
|
|
23
|
+
fi
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
exit 0
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PreToolUse hook: validate auth and check credits before tl commands.
|
|
3
|
+
# Only runs when the Bash command starts with "tl ".
|
|
4
|
+
|
|
5
|
+
COMMAND="${TOOL_INPUT_command:-}"
|
|
6
|
+
|
|
7
|
+
# Only act on tl commands
|
|
8
|
+
if [[ ! "$COMMAND" =~ ^tl[[:space:]] ]]; then
|
|
9
|
+
exit 0
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Skip for system commands that don't need auth
|
|
13
|
+
if [[ "$COMMAND" =~ ^tl[[:space:]]+(auth|doctor|--help|--version|describe) ]]; then
|
|
14
|
+
exit 0
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
# Check auth
|
|
18
|
+
if ! tl auth status --quiet 2>/dev/null; then
|
|
19
|
+
echo "WARN: Not authenticated. Run 'tl auth login' first." >&2
|
|
20
|
+
exit 0 # Don't block, just warn
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
# For list commands without explicit limit, suggest adding one
|
|
24
|
+
if [[ "$COMMAND" =~ ^tl[[:space:]]+(deals|uploads|channels|brands)[[:space:]] ]]; then
|
|
25
|
+
if [[ ! "$COMMAND" =~ limit: ]] && [[ ! "$COMMAND" =~ --limit ]]; then
|
|
26
|
+
echo "HINT: Consider adding a limit to control credit usage (e.g., limit:50)" >&2
|
|
27
|
+
fi
|
|
28
|
+
fi
|
|
29
|
+
|
|
30
|
+
exit 0
|