@letterstory/cli 0.177.142 → 0.177.144
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/lib/cli.mjs +4 -1
- package/lib/commands/admin.mjs +8 -2
- package/lib/commands/insights.mjs +16 -1
- package/lib/commands/visits.mjs +4 -3
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
94
94
|
|
|
95
95
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
96
|
-
export const VERSION = "0.177.
|
|
96
|
+
export const VERSION = "0.177.144";
|
|
97
97
|
|
|
98
98
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
99
99
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -116,6 +116,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
116
116
|
// visits export: only the people or companies who fit the ICP, or only those who don't.
|
|
117
117
|
"icp",
|
|
118
118
|
"not-icp",
|
|
119
|
+
// visits sites: also return each site's script.
|
|
120
|
+
"install",
|
|
119
121
|
// org mcp add: the server signs in with OAuth instead of a header value.
|
|
120
122
|
"sign-in",
|
|
121
123
|
// collection onboard: connect without drafting or scheduling.
|
|
@@ -1944,6 +1946,7 @@ Insights:
|
|
|
1944
1946
|
insights question <key> [--period 14d|30d|90d] [--filter all|named_you|rival_not_you|no_one] [--limit n]
|
|
1945
1947
|
One By-question row: the wordings asked and the AI answers
|
|
1946
1948
|
insights detection How your brand is detected in AI answers (terms, who set them)
|
|
1949
|
+
insights set-detection --term <name> [--dry-run] Change the names counted in AI answers (--clear restores inferred names)
|
|
1947
1950
|
insights properties Search Console properties the connected Google account can read, the
|
|
1948
1951
|
unverified ones, and the one tracked
|
|
1949
1952
|
insights property <site-url> Pick the Search Console property to track (a key minted by an admin)
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -5221,8 +5221,12 @@ async function cmdAdminRepublish(ctx) {
|
|
|
5221
5221
|
}
|
|
5222
5222
|
|
|
5223
5223
|
const RECIPES = "/api/superadmin/recipes";
|
|
5224
|
-
/**
|
|
5225
|
-
|
|
5224
|
+
/**
|
|
5225
|
+
* The fields a recipe file carries: what import_recipes reads back. Every field a save accepts (recipes/types.ts
|
|
5226
|
+
* RECIPE_FIELDS) is here, held by commands-admin-recipes.test.ts: a field left out was dropped by every export and
|
|
5227
|
+
* saved as its default by every import, six times before that test.
|
|
5228
|
+
*/
|
|
5229
|
+
export const RECIPE_FILE_FIELDS = [
|
|
5226
5230
|
"id",
|
|
5227
5231
|
"kind",
|
|
5228
5232
|
"name",
|
|
@@ -5248,6 +5252,8 @@ const RECIPE_FILE_FIELDS = [
|
|
|
5248
5252
|
"repeats",
|
|
5249
5253
|
// The site's pages the fit reads before deciding it (2026-11-16); left out here, an export would drop it.
|
|
5250
5254
|
"read_pages",
|
|
5255
|
+
// Whether Ideas pre-builds it as a preview (2026-11-24); left out here, an import saved it false.
|
|
5256
|
+
"visible",
|
|
5251
5257
|
"status",
|
|
5252
5258
|
"needs",
|
|
5253
5259
|
"variations",
|
|
@@ -32,6 +32,19 @@ export const ARGS = {
|
|
|
32
32
|
period: { flag: "period", enum: PERIODS },
|
|
33
33
|
},
|
|
34
34
|
get_brand_detection: {},
|
|
35
|
+
set_brand_detection: {
|
|
36
|
+
detection: {
|
|
37
|
+
object: {
|
|
38
|
+
terms: { flag: "term", type: "list" },
|
|
39
|
+
exact_case_terms: { flag: "exact-case-term", type: "list" },
|
|
40
|
+
exclude_phrases: { flag: "exclude-phrase", type: "list" },
|
|
41
|
+
clear: { flag: "clear", type: "bool" },
|
|
42
|
+
note: { flag: "note" },
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
dry_run: { flag: "dry-run", type: "bool" },
|
|
46
|
+
sample_answer: { flag: "sample-answer" },
|
|
47
|
+
},
|
|
35
48
|
get_reads: {
|
|
36
49
|
period: { flag: "period", enum: PERIODS },
|
|
37
50
|
sites: { flag: "site", type: "list" },
|
|
@@ -143,6 +156,8 @@ export async function cmdInsights(ctx) {
|
|
|
143
156
|
return call(rest, "get_share_of_voice_question");
|
|
144
157
|
case "detection":
|
|
145
158
|
return call(rest, "get_brand_detection");
|
|
159
|
+
case "set-detection":
|
|
160
|
+
return call(rest, "set_brand_detection");
|
|
146
161
|
case "reads":
|
|
147
162
|
return call(rest, "get_reads");
|
|
148
163
|
case "tracking-cadence":
|
|
@@ -178,7 +193,7 @@ export async function cmdInsights(ctx) {
|
|
|
178
193
|
return call(rest, "select_gsc_property");
|
|
179
194
|
default:
|
|
180
195
|
throw new CliError(
|
|
181
|
-
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, tracking-cadence, set-tracking-cadence, prompts, keywords [topic], add-keywords, pages, page, mentions, portrayal, claims, competitors, question, detection, activity, story, site, post, top, bank, access, properties, property`
|
|
196
|
+
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, tracking-cadence, set-tracking-cadence, prompts, keywords [topic], add-keywords, pages, page, mentions, portrayal, claims, competitors, question, detection, set-detection, activity, story, site, post, top, bank, access, properties, property`
|
|
182
197
|
);
|
|
183
198
|
}
|
|
184
199
|
}
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
// letterstory visits retention [--days 90] which features new people used early and came back
|
|
15
15
|
// letterstory visits export --since 30d --format csv
|
|
16
16
|
// letterstory visits export --include people --icp > icp.csv the people who fit your ICP, as Humans shows them
|
|
17
|
-
// letterstory visits sites
|
|
17
|
+
// letterstory visits sites [--install] (--install adds each site's script)
|
|
18
18
|
// letterstory visits domain composal.com [--site <id>] move the site to a new domain, keeping its key
|
|
19
19
|
// letterstory visits pages --since 28d [--path '/docs/*'] [--agent openai-crawler]
|
|
20
20
|
// letterstory visits health --site <id> staff: how far to trust a site's numbers, and what to fix
|
|
@@ -40,7 +40,7 @@ const PATH_KINDS = ["page", "agent_file", "site_file", "asset"];
|
|
|
40
40
|
const days = { value: (flags) => sinceDays(flags.since) };
|
|
41
41
|
|
|
42
42
|
export const ARGS = {
|
|
43
|
-
visitors_list_sites: {},
|
|
43
|
+
visitors_list_sites: { install: { flag: "install", type: "bool" } },
|
|
44
44
|
get_editor_shortcut: {},
|
|
45
45
|
set_editor_shortcut: {
|
|
46
46
|
// "default" (or "reset") puts ⌘L back: the tool's null.
|
|
@@ -652,7 +652,8 @@ async function visitsSites(ctx) {
|
|
|
652
652
|
s.script_seen_at ? "script ✓" : "script ✗",
|
|
653
653
|
s.server_seen_at ? "server snippet ✓" : "server snippet ✗",
|
|
654
654
|
].join(", ");
|
|
655
|
-
|
|
655
|
+
const script = r.scripts?.find((x) => x.site_id === s.site_id)?.visitors_snippet;
|
|
656
|
+
return `${s.site_id} ${s.domain ?? s.name} (${checks})${script ? `\n ${script}` : ""}`;
|
|
656
657
|
})
|
|
657
658
|
.join("\n");
|
|
658
659
|
});
|