thoughtleaders-cli 0.7.13__tar.gz → 0.7.14__tar.gz

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.
Files changed (122) hide show
  1. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.claude-plugin/plugin.json +1 -1
  2. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/PKG-INFO +1 -1
  3. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/pyproject.toml +1 -1
  4. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl/SKILL.md +14 -0
  5. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl/references/elasticsearch-schema.md +14 -2
  6. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/__init__.py +1 -1
  7. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/db.py +7 -0
  8. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.claude-plugin/marketplace.json +0 -0
  9. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.github/dependabot.yml +0 -0
  10. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.github/workflows/ci.yml +0 -0
  11. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.github/workflows/cli-integration.yml +0 -0
  12. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.github/workflows/python-publish.yml +0 -0
  13. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/.gitignore +0 -0
  14. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/AGENTS.md +0 -0
  15. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/API.md +0 -0
  16. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/CLAUDE.md +0 -0
  17. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/LICENSE +0 -0
  18. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/README.md +0 -0
  19. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/agents/tl-analyst.md +0 -0
  20. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/agents/youtube-comment-classifier.md +0 -0
  21. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/hooks/hooks.json +0 -0
  22. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/hooks/scripts/load-tl-skill.mjs +0 -0
  23. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/hooks/scripts/post-usage.sh +0 -0
  24. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/hooks/scripts/pre-check.sh +0 -0
  25. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl/references/business-glossary.md +0 -0
  26. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl/references/firebolt-schema.md +0 -0
  27. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl/references/postgres-schema.md +0 -0
  28. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/.gitignore +0 -0
  29. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/SKILL.md +0 -0
  30. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/references/comment-patterns.md +0 -0
  31. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/references/peer-cohort.md +0 -0
  32. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/references/red-flags.md +0 -0
  33. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/references/scoring.md +0 -0
  34. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/_io_utf8.py +0 -0
  35. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/analyze_channel.py +0 -0
  36. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/anomaly_detector.py +0 -0
  37. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/comment_analyzer.py +0 -0
  38. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/comment_scraper.py +0 -0
  39. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/engagement_ratios.py +0 -0
  40. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/peer_cohort.py +0 -0
  41. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/report.py +0 -0
  42. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/resolve_channel.py +0 -0
  43. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/score.py +0 -0
  44. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/tl_cli.py +0 -0
  45. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/video_integrity.py +0 -0
  46. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-channel-authenticity/scripts/view_curves.py +0 -0
  47. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-keyword-research/SKILL.md +0 -0
  48. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-keyword-research/scripts/probe.py +0 -0
  49. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/SKILL.md +0 -0
  50. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/columns_brands.md +0 -0
  51. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/columns_channels.md +0 -0
  52. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/columns_content.md +0 -0
  53. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/columns_sponsorships.md +0 -0
  54. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/intelligence_filterset_schema.json +0 -0
  55. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/intelligence_widget_schema.json +0 -0
  56. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/report_glossary.md +0 -0
  57. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/sortable_columns.json +0 -0
  58. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/sponsorship_filterset_schema.json +0 -0
  59. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/sponsorship_widget_schema.json +0 -0
  60. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-save-report/references/widgets.md +0 -0
  61. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-top-partnerships/SKILL.md +0 -0
  62. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-top-partnerships/scripts/top_partnerships.py +0 -0
  63. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-views-guarantee/SKILL.md +0 -0
  64. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/skills/tl-views-guarantee/scripts/vg.py +0 -0
  65. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/_completions.py +0 -0
  66. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/_typer_utils.py +0 -0
  67. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/auth/__init__.py +0 -0
  68. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/auth/commands.py +0 -0
  69. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/auth/login.py +0 -0
  70. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/auth/pkce.py +0 -0
  71. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/auth/token_store.py +0 -0
  72. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/client/__init__.py +0 -0
  73. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/client/errors.py +0 -0
  74. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/client/http.py +0 -0
  75. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/__init__.py +0 -0
  76. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/_comments_common.py +0 -0
  77. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/balance.py +0 -0
  78. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/brands.py +0 -0
  79. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/bulk_import.py +0 -0
  80. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/changelog.py +0 -0
  81. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/channels.py +0 -0
  82. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/credits.py +0 -0
  83. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/deals.py +0 -0
  84. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/describe.py +0 -0
  85. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/doctor.py +0 -0
  86. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/matches.py +0 -0
  87. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/proposals.py +0 -0
  88. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/recommender.py +0 -0
  89. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/reports.py +0 -0
  90. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/schema.py +0 -0
  91. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/setup.py +0 -0
  92. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/snapshots.py +0 -0
  93. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/sponsorships.py +0 -0
  94. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/uploads.py +0 -0
  95. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/commands/whoami.py +0 -0
  96. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/config.py +0 -0
  97. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/filters.py +0 -0
  98. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/hints.py +0 -0
  99. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/main.py +0 -0
  100. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/output/__init__.py +0 -0
  101. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/output/formatter.py +0 -0
  102. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/src/tl_cli/self_update.py +0 -0
  103. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/__init__.py +0 -0
  104. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_auth.py +0 -0
  105. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_brands_winner_channels.py +0 -0
  106. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_channels_lookalike.py +0 -0
  107. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_describe.py +0 -0
  108. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_filters.py +0 -0
  109. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_http_auth.py +0 -0
  110. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_output.py +0 -0
  111. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_reports.py +0 -0
  112. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_setup.py +0 -0
  113. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests/test_sponsorships.py +0 -0
  114. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/AGENTS.md +0 -0
  115. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/conftest.py +0 -0
  116. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_balance.py +0 -0
  117. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_db_es.py +0 -0
  118. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_db_fb.py +0 -0
  119. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_db_pg.py +0 -0
  120. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_schema.py +0 -0
  121. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/tests_cli/test_whoami.py +0 -0
  122. {thoughtleaders_cli-0.7.13 → thoughtleaders_cli-0.7.14}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tl-cli",
3
- "version": "0.7.13",
3
+ "version": "0.7.14",
4
4
  "description": "ThoughtLeaders CLI — query sponsorship deals, channels, brands, uploads, and intelligence from the terminal",
5
5
  "author": {
6
6
  "name": "ThoughtLeaders",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thoughtleaders-cli
3
- Version: 0.7.13
3
+ Version: 0.7.14
4
4
  Summary: ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence
5
5
  Project-URL: Homepage, https://thoughtleaders.io
6
6
  Project-URL: Repository, https://github.com/ThoughtLeaders-io/thoughtleaders-cli
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "thoughtleaders-cli"
7
- version = "0.7.13"
7
+ version = "0.7.14"
8
8
  description = "ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -238,8 +238,22 @@ tl sponsorships update 98765 '{"publish_status": 3}'
238
238
  tl channels update 12345 '{"demographic_male_share": 62}'
239
239
  tl channels update 12345 '{"demographic_geo": {"US": 60, "UK": 12, "CA": 8}}'
240
240
  tl channels update 12345 '{"demographic_male_share": 55, "demographic_usa_share": 70}'
241
+ tl channels update 12345 '{"outreach_email": "press@creator.com"}'
242
+ tl channels update 12345 '{"all_emails": {"press@creator.com": {"timestamp": "2026-06-25T12:00:00+00:00", "source": "manual"}}}'
241
243
  ```
242
244
 
245
+ **Channel contact emails.** Besides demographics, `tl channels update` accepts two
246
+ contact fields:
247
+
248
+ - **`outreach_email`** — the channel's primary outreach address (a single email string, or `null`).
249
+ - **`all_emails`** — the channel's full email archive. It is **not** a free-form blob: it's
250
+ a JSON object keyed by email address, each value an object `{"timestamp": <ISO-8601 datetime>, "source": <string>}`.
251
+ `timestamp` must parse as ISO-8601 (e.g. `"2026-06-25T12:00:00+00:00"`); `source` records
252
+ where the address came from. Known `source` values: `outreach_email` (the address that was
253
+ the primary outreach email, archived when the channel was blacklisted), `google_search`,
254
+ `scheduled_rescrape`. Use a descriptive token such as `manual` for hand-added entries.
255
+ An edit **replaces** the whole `all_emails` object, so include every entry you want to keep.
256
+
243
257
  ### Creating and vetting sponsorships
244
258
 
245
259
  This is the end-to-end workflow for proposing a sponsorship, then moving it through the funnel as the two sides respond. Three create commands plus `tl sponsorships update` cover every state transition the CLI exposes.
@@ -41,8 +41,8 @@ Filter with `{"term": {"doc_type": "article"}}`.
41
41
  | `id` | keyword | Video/article ID. Compound form `<channel_id>:<youtube_id>` (matches PG `adlink.article_id` and ES `_id`). |
42
42
  | `title` | text | Video title |
43
43
  | `description` | text | Video description |
44
- | `content` | text | Full content/transcript text |
45
- | `transcript` | text | Raw transcript |
44
+ | `content` | text | Full content/transcript text (plain text; not always populated) |
45
+ | `transcript` | text | Raw transcript — stored as YouTube timed-text **XML**, not plain text (see note below) |
46
46
  | `transcript_language` | keyword | Transcript language code |
47
47
  | `summary` | text | AI-generated summary |
48
48
  | `publication_date` | date | When video was published |
@@ -244,6 +244,18 @@ Repeat until a page comes back short (`next_search_after` is absent on an empty
244
244
 
245
245
  `text` fields on article docs (`title`, `summary`, `transcript`) appear to use the `standard` analyzer (tokenize + lowercase, no stemmer, no English-possessive filter), so inflections, plurals, and possessives are each indexed as distinct terms. For example: `bitcoin` (4,466,300) vs `bitcoins` (489,262). For stemming-style recall, expand the query side with a `bool.should` over the variants.
246
246
 
247
+ ## Transcript field format
248
+
249
+ The `transcript` field's `_source` is **YouTube timed-text caption XML**, not plain prose. Each caption cue is a `<text start="…" dur="…">` element wrapped in `<transcript>`, and the inner text is **double HTML-entity-encoded** (an apostrophe is `&amp;#39;`, i.e. an escaped `&#39;`):
250
+
251
+ ```xml
252
+ <?xml version="1.0" encoding="utf-8" ?>
253
+ <transcript><text start="0.05" dur="4.33">I&amp;#39;m going to</text>...</transcript>
254
+ ```
255
+
256
+ - **Searching is unaffected** — the field is analyzed as `text`, so `match` / `match_phrase` queries hit the words directly regardless of the markup. The XML only matters when you retrieve and read the raw `_source`.
257
+ - **For plain prose**, either use the `content` field (plain text, but not always populated) or strip the markup yourself, e.g. `jq -r '.results[0].transcript' | sed -E 's/<[^>]+>/ /g'` and then unescape entities twice (the encoding is doubled).
258
+
247
259
  ## Notes & gotchas
248
260
 
249
261
  - **Composite IDs:** `tl-platform.id` and `_id` are `<channel_id>:<youtube_id>`. The `youtube_id` portion alone is what Firebolt's `article_metrics.id` stores.
@@ -1,3 +1,3 @@
1
1
  """ThoughtLeaders CLI — query sponsorship data, channels, brands, and intelligence."""
2
2
 
3
- __version__ = "0.7.13"
3
+ __version__ = "0.7.14"
@@ -108,6 +108,10 @@ def es_cmd(
108
108
  False, "--pricing",
109
109
  help="Estimate the query's credit cost without running it (flat 1 credit).",
110
110
  ),
111
+ highlight: bool = typer.Option(
112
+ False, "--highlight",
113
+ help="Keep ES highlight fragments in each result row. Only meaningful when the query body includes a `highlight` clause; otherwise no-op.",
114
+ ),
111
115
  ) -> None:
112
116
  """Run a raw Elasticsearch search query.
113
117
 
@@ -116,6 +120,7 @@ def es_cmd(
116
120
  Examples:
117
121
  tl db es '{"size": 5, "query": {"term": {"channel.id": 5607}}}'
118
122
  tl db es '{"size": 0, "aggs": {"by_channel": {"terms": {"field": "channel.id"}}}}'
123
+ tl db es '{"query": {"match": {"transcript": "vpn"}}, "highlight": {"fields": {"transcript": {}}}}' --highlight
119
124
  """
120
125
  fmt = detect_format(json_output, csv_output, md_output, toon_output)
121
126
  raw = _read_query(query)
@@ -127,4 +132,6 @@ def es_cmd(
127
132
  body: dict = {"query": body_query}
128
133
  if pricing:
129
134
  body["pricing"] = True
135
+ if highlight:
136
+ body["include_highlight"] = True
130
137
  _run("/raw/es", body, fmt, "Elasticsearch results", pricing=pricing)