@senso-ai/cli 0.11.0 → 0.12.0
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.
- package/README.md +100 -22
- package/dist/cli.js +1297 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,9 +124,11 @@ Options: `--max-results <n>`
|
|
|
124
124
|
```
|
|
125
125
|
senso content list List all knowledge base items
|
|
126
126
|
senso content get <id> Get full content detail by ID
|
|
127
|
+
senso content versions <id> List version history for a content item
|
|
127
128
|
senso content delete <id> Delete content (knowledge base + external)
|
|
128
129
|
senso content unpublish <id> Unpublish and revert to draft
|
|
129
130
|
senso content verification List items in verification workflow
|
|
131
|
+
senso content verification-counts Counts by status + published-domain summaries
|
|
130
132
|
senso content reject <versionId> Reject a content version
|
|
131
133
|
senso content restore <versionId> Restore rejected version to draft
|
|
132
134
|
senso content owners <id> List owners of a content item
|
|
@@ -134,7 +136,16 @@ senso content set-owners <id> Replace owners (--user-ids)
|
|
|
134
136
|
senso content remove-owner <id> <userId> Remove a single owner
|
|
135
137
|
```
|
|
136
138
|
|
|
137
|
-
Options: `content list` supports `--limit`, `--offset`, `--search`, `--sort`. `content verification` supports `--limit`, `--offset`, `--search`, `--status`. `content reject` supports `--reason`.
|
|
139
|
+
Options: `content list` supports `--limit`, `--offset`, `--search`, `--sort`. `content verification` supports `--limit`, `--offset`, `--search`, `--status`, `--substatus`. `content reject` supports `--reason`.
|
|
140
|
+
|
|
141
|
+
### Generated Content (GEO)
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
senso generated-content list List published or draft generated content (--status published|drafts)
|
|
145
|
+
senso generated-content get <id> Get a generated content item with its rendered body
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Options: `generated-content list` supports `--status`, `--limit`, `--offset`, `--search`.
|
|
138
149
|
|
|
139
150
|
### Content Generation
|
|
140
151
|
|
|
@@ -152,6 +163,24 @@ senso engine publish Publish content to external destinations (-
|
|
|
152
163
|
senso engine draft Save content as draft for review (--data)
|
|
153
164
|
```
|
|
154
165
|
|
|
166
|
+
### Tracked Competitors & Sources
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
senso competitors list List tracked competitors
|
|
170
|
+
senso competitors add Add a competitor (--name, --url)
|
|
171
|
+
senso competitors suggest Get AI-generated competitor suggestions
|
|
172
|
+
senso competitors batch-add Add up to 50 competitors (--data)
|
|
173
|
+
senso competitors update <id> Update a competitor (--name, --url)
|
|
174
|
+
senso competitors delete <id> Remove a competitor
|
|
175
|
+
|
|
176
|
+
senso tracked-sources list List citation-classification rules
|
|
177
|
+
senso tracked-sources add Add a rule (--pattern, --match-type, --tier)
|
|
178
|
+
senso tracked-sources update <id> Replace a rule (--pattern, --match-type, --tier)
|
|
179
|
+
senso tracked-sources delete <id> Remove a rule
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Options: `tracked-sources add`/`update` support `--category`, `--label`, `--priority`; `update` also supports `--active`/`--no-active`. `--match-type` is one of `domain | host | path_prefix | exact_url`; `--tier` is one of `primary | tracked | secondary`.
|
|
183
|
+
|
|
155
184
|
### Ingestion
|
|
156
185
|
|
|
157
186
|
```
|
|
@@ -185,6 +214,63 @@ senso prompts delete <promptId> Delete a prompt
|
|
|
185
214
|
|
|
186
215
|
Options: `prompts list` supports `--limit`, `--offset`, `--search`, `--sort`.
|
|
187
216
|
|
|
217
|
+
### Analytics (GEO)
|
|
218
|
+
|
|
219
|
+
Read-only metrics for your own organization: how often the AI models name your brand, your share of every brand mention the models made, and which domains and pages get cited. Works with the organization API key from `senso login`.
|
|
220
|
+
|
|
221
|
+
```
|
|
222
|
+
senso analytics summary Headline metrics + previous window + deltas
|
|
223
|
+
senso analytics mentions Visibility time series (day or week buckets)
|
|
224
|
+
senso analytics citations Citation rates and shares, with the series
|
|
225
|
+
senso analytics domains Cited domains, ranked (coverage + share)
|
|
226
|
+
senso analytics pages Cited pages, with the prompts driving them
|
|
227
|
+
senso analytics prompts Per-prompt performance table
|
|
228
|
+
senso analytics prompt <promptId> One prompt: history + latest full answers
|
|
229
|
+
senso analytics answers Latest answer per prompt × model × location
|
|
230
|
+
senso analytics glossary Canonical definition of every metric
|
|
231
|
+
senso analytics filters Filter values that have data for this org
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Options:
|
|
235
|
+
|
|
236
|
+
| Command | Options |
|
|
237
|
+
|---------|---------|
|
|
238
|
+
| all except `prompt <promptId>`, `glossary`, `filters` | `--from`, `--to`, `--models`, `--location`, `--prompt-type`, `--tag` |
|
|
239
|
+
| `mentions`, `citations` | `--group-by <day\|week>` |
|
|
240
|
+
| `domains` | `--tier`, `--domain-contains`, `--sort <citations\|coverage>`, `--limit`, `--offset` |
|
|
241
|
+
| `pages` | `--tier`, `--domain`, `--domain-contains`, `--url-contains`, `--sort <citations\|coverage>`, `--limit`, `--offset` |
|
|
242
|
+
| `prompts` | `--search`, `--sort <mention_rate\|share_of_voice\|citations\|answered\|text>`, `--order <asc\|desc>`, `--limit`, `--offset` |
|
|
243
|
+
| `prompt <promptId>` | `--from`, `--to`, `--models`, `--location`, `--no-include-answers` |
|
|
244
|
+
| `answers` | `--from`, `--to`, `--models`, `--location`, `--prompt-type`, `--tag`, `--mentioned <bool>`, `--cited <bool>`, `--citation-tier <primary\|tracked\|secondary>`, `--limit`, `--offset` |
|
|
245
|
+
|
|
246
|
+
`--from`/`--to` are `YYYY-MM-DD` and default to the 30 days ending at the most recent day that has data for your model/location filter (max window: 365 days). `--models` and `--location` are comma-separated; locations are case-sensitive exact codes (`US`, `US/California`) — the API also accepts `locations` as an alias for the `location` query param. Run `senso analytics filters` to see the values that actually have data.
|
|
247
|
+
|
|
248
|
+
`analytics answers` is a snapshot, not a window. It always returns the newest stored answer per prompt × model × location, and `--from`/`--to` filter on `run_at` — when that answer was collected. Narrowing the window therefore **hides** prompt × model × location combinations whose latest answer falls outside it; it does not return older answers in their place. Use `analytics mentions` or `analytics citations` for history.
|
|
249
|
+
|
|
250
|
+
Reading the numbers:
|
|
251
|
+
|
|
252
|
+
- **Share of Voice** is your mention instances ÷ `brand_mention_total` — mentions of *every* brand the models named, not just your tracked competitors. It matches the Share of Voice in the Senso app. `tracked_mention_total` is still returned as a raw count in `totals`, but it is not the denominator.
|
|
253
|
+
- **Citation Rate** and **Citation Coverage** divide by `D` — answers with at least one citation. **Citation Share** divides by `S` — total citation instances. They are different metrics on different denominators; every table shows the numerator and denominator next to the percentage so you can check.
|
|
254
|
+
- The three tier **rates** are independent and can sum past 100% (one answer can cite an owned page and an external page). The three tier **shares** partition and sum to exactly 100%.
|
|
255
|
+
- A metric renders as `—` when its denominator was zero. That is "not measured", not 0%.
|
|
256
|
+
- Every response carries `notes[]` — caveats about window truncation, null denominators and tracking-set dependence. They are printed under a **Notes** heading in `plain` and `table` output, and are part of the payload in `--output json`.
|
|
257
|
+
- `senso analytics glossary` is the canonical definition, denominator and gotcha for every metric.
|
|
258
|
+
|
|
259
|
+
### Industry Intelligence (partner key required)
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
senso industries list List industries visible to the partner
|
|
263
|
+
senso industries summary <industry> Industry overview over a time window
|
|
264
|
+
senso industries brand <industry> <brandName> One brand within an industry
|
|
265
|
+
senso industries domain <industry> <domainOrUrl> Domain/URL citation lookup
|
|
266
|
+
senso industries prompt-metrics <industry> Per-prompt industry metrics
|
|
267
|
+
senso industries glossary Competitive-intelligence metric glossary
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
These commands read partner-scoped endpoints and **require a partner API key**. The organization key stored by `senso login` is rejected with a 401/403 — pass a partner key with `--api-key <key>` or `SENSO_API_KEY`. For metrics about your own organization, use `senso analytics` instead.
|
|
271
|
+
|
|
272
|
+
Options: all except `list` and `glossary` support `--from`, `--to`, `--location`, `--models`; `prompt-metrics` also supports `--limit`, `--offset`; `list` supports `--search`. The `<industry>` argument accepts a UUID or a name (e.g. `"Automotive"`).
|
|
273
|
+
|
|
188
274
|
### Organization
|
|
189
275
|
|
|
190
276
|
```
|
|
@@ -219,15 +305,6 @@ senso run-config schedule Get run schedule (days of week)
|
|
|
219
305
|
senso run-config set-schedule Set run schedule (--data)
|
|
220
306
|
```
|
|
221
307
|
|
|
222
|
-
### Notifications
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
senso notifications list List notifications
|
|
226
|
-
senso notifications read <id> Mark notification as read
|
|
227
|
-
```
|
|
228
|
-
|
|
229
|
-
Options: `notifications list` supports `--limit`, `--offset`, `--unread-only`.
|
|
230
|
-
|
|
231
308
|
### CLI Management
|
|
232
309
|
|
|
233
310
|
```
|
|
@@ -298,7 +375,7 @@ cnt_def456 Variable Rate Products draft
|
|
|
298
375
|
|
|
299
376
|
## Auto-Update
|
|
300
377
|
|
|
301
|
-
The CLI checks for new versions once every 24 hours (via
|
|
378
|
+
The CLI checks for new versions once every 24 hours (via the npm registry) and shows a notice on stderr if an update is available:
|
|
302
379
|
|
|
303
380
|
```
|
|
304
381
|
╭──────────────────────────────────────────────╮
|
|
@@ -344,22 +421,26 @@ npm test
|
|
|
344
421
|
```
|
|
345
422
|
src/
|
|
346
423
|
├── cli.ts # Entry point — arg parsing, command dispatch
|
|
347
|
-
├── commands/ # One file per command group
|
|
424
|
+
├── commands/ # One file per command group
|
|
348
425
|
│ ├── auth.ts # login, logout, whoami
|
|
349
426
|
│ ├── search.ts # search, search context, search content
|
|
350
|
-
│ ├── content.ts # CRUD + verification + owners
|
|
427
|
+
│ ├── content.ts # CRUD + versions + verification + owners
|
|
428
|
+
│ ├── generated-content.ts # GEO generated content (list, get)
|
|
351
429
|
│ ├── generate.ts # content generation settings + triggers
|
|
352
430
|
│ ├── engine.ts # publish, draft
|
|
431
|
+
│ ├── competitors.ts # tracked competitors CRUD + suggest
|
|
432
|
+
│ ├── tracked-sources.ts # citation-classification rules CRUD
|
|
353
433
|
│ ├── ingest.ts # upload, reprocess (with S3 upload)
|
|
354
434
|
│ ├── brand-kit.ts # get, set
|
|
355
435
|
│ ├── content-types.ts # CRUD
|
|
356
436
|
│ ├── prompts.ts # CRUD
|
|
437
|
+
│ ├── analytics.ts # org GEO analytics (summary, citations, prompts, …)
|
|
438
|
+
│ ├── industries.ts # partner-scoped competitive intelligence
|
|
357
439
|
│ ├── org.ts # get, update
|
|
358
440
|
│ ├── users.ts # CRUD + set-current
|
|
359
441
|
│ ├── api-keys.ts # CRUD + revoke
|
|
360
442
|
│ ├── members.ts # list
|
|
361
443
|
│ ├── run-config.ts # models, schedule
|
|
362
|
-
│ ├── notifications.ts # list, read
|
|
363
444
|
│ └── update.ts # self-update
|
|
364
445
|
├── lib/
|
|
365
446
|
│ ├── api-client.ts # HTTP wrapper (native fetch, X-API-Key auth)
|
|
@@ -369,7 +450,7 @@ src/
|
|
|
369
450
|
└── utils/
|
|
370
451
|
├── logger.ts # Colored log helpers (picocolors)
|
|
371
452
|
├── branding.ts # ASCII logo, gradient banner, boxed panels
|
|
372
|
-
└── updater.ts #
|
|
453
|
+
└── updater.ts # npm registry version check
|
|
373
454
|
```
|
|
374
455
|
|
|
375
456
|
### Tech Stack
|
|
@@ -388,7 +469,7 @@ src/
|
|
|
388
469
|
|
|
389
470
|
### Releasing a New Version
|
|
390
471
|
|
|
391
|
-
This project uses [semantic versioning](https://semver.org/).
|
|
472
|
+
This project uses [semantic versioning](https://semver.org/). Publishing to npm is automated: pushing a `v*` tag runs `.github/workflows/publish.yml`, which builds the CLI and publishes it via [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers) (GitHub Actions OIDC, no token secrets). Every pull request and push to `main` runs `.github/workflows/ci.yml` (typecheck, build, tests, smoke test).
|
|
392
473
|
|
|
393
474
|
```bash
|
|
394
475
|
# 1. Bump the version in package.json, commit, and create a git tag
|
|
@@ -396,14 +477,11 @@ npm version patch # 0.1.0 → 0.1.1 (bug fixes)
|
|
|
396
477
|
npm version minor # 0.1.0 → 0.2.0 (new features, backwards-compatible)
|
|
397
478
|
npm version major # 0.1.0 → 1.0.0 (breaking changes)
|
|
398
479
|
|
|
399
|
-
# 2. Push the commit and tag
|
|
400
|
-
git push
|
|
401
|
-
|
|
402
|
-
# 3. Create a GitHub release (this is what the auto-updater checks)
|
|
403
|
-
gh release create v0.2.0 --title "v0.2.0" --notes "Release notes here"
|
|
480
|
+
# 2. Push the commit and tag — the tag triggers the publish workflow
|
|
481
|
+
git push --follow-tags
|
|
404
482
|
```
|
|
405
483
|
|
|
406
|
-
|
|
484
|
+
The publish workflow refuses to run if the tag does not match the version in `package.json`. Once it finishes, users running the CLI will see the update notice within 24 hours (or immediately via `senso update`).
|
|
407
485
|
|
|
408
486
|
---
|
|
409
487
|
|