@letterstory/cli 0.177.125 → 0.177.127

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 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.125";
96
+ export const VERSION = "0.177.127";
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;
@@ -938,6 +938,8 @@ Offerings (context layered org → offering → collection; a layer sets only wh
938
938
  probes add <question> [--kind mention|citation] [--scope site|company|<blogId>] [--cluster <id>]
939
939
  onboarding status Show the onboarding checklist
940
940
  onboarding for <website|seo|geo|visitors|cmd_l> … What Letter is for: the onboarding's first question
941
+ onboarding site ["<what you're building>"] [--brands a.com,b.com] [--backend repo|none|not_app]
942
+ No website: Letter builds one on a preview address
941
943
  onboarding step [--current <step>] [--complete <step>] [--skip <step>] [--status <status>]
942
944
  series list The org's content series + coverage state
943
945
  series create --name <n> [--description <d>] [--coverage a,b,c] [--collection <uuid>] [--template <key>]
@@ -1917,6 +1919,7 @@ Insights:
1917
1919
  Measure → Reads: AI engines and people reading your sites, counted one way
1918
1920
  insights prompts [--period 14d|30d|90d] Measure → Prompt tracking: every prompt we ask, each engine's latest answer, share / change / cited
1919
1921
  insights keywords [topic] [--refresh] Measure → Keyword tracking: your keywords (searches, difficulty, intent, rank, tracked), or research a topic
1922
+ insights add-keywords --cluster <id> --keyword <k> Add keywords to a keyword cluster (repeat --keyword or comma-separate)
1920
1923
  insights pages [--period 14d|30d|90d] [--site own|phantoms|<key>] Measure → Pages: your pages AI answers cited, won questions first
1921
1924
  insights page <page> [--period 14d|30d|90d] [--question <prompt-id>] [--filter all|won] [--limit n]
1922
1925
  One cited page: the AI answers that linked it, word for word
@@ -3,7 +3,7 @@
3
3
  // insights.ts); plus Measure's Overview (`summary`), GEO → Competitors
4
4
  // (`competitors`), AI Visibility Bank (`bank`) and phantom Page Access (`access`);
5
5
  // Measure → Reads (`reads`), Prompt tracking (`prompts`, also `questions`), Keyword tracking (`keywords`, or
6
- // `keywords <topic>` to research one), Pages (`pages`, one page's answers `page`), the posts naming you (`mentions`)
6
+ // `keywords <topic>` to research one, `add-keywords` to add some to a cluster), Pages (`pages`, one page's answers `page`), the posts naming you (`mentions`)
7
7
  // and Portrayal (`portrayal`, its claims `claims`: how AI answers describe you), and the live feed of what
8
8
  // is reading the phantom sites (`activity`), The Story's signals snapshot (`story`) — the same reads the web app renders. Search Console's
9
9
  // property: which ones the connected Google account can read (`properties`) and the one tracked (`property`).
@@ -49,6 +49,10 @@ export const ARGS = {
49
49
  research_keywords: {
50
50
  topic: { positional: 0, label: "topic", required: true },
51
51
  },
52
+ add_keywords: {
53
+ cluster_id: { flag: "cluster", required: true },
54
+ keywords: { flag: "keyword", type: "list", required: true },
55
+ },
52
56
  list_cited_pages: {
53
57
  period: { flag: "period", enum: PERIODS },
54
58
  sites: { flag: "site", type: "list" },
@@ -119,6 +123,8 @@ export async function cmdInsights(ctx) {
119
123
  return call(rest, "list_measure_questions");
120
124
  case "keywords":
121
125
  return rest.positionals.length > 0 ? call(rest, "research_keywords") : call(rest, "list_seo_opportunities");
126
+ case "add-keywords":
127
+ return call(rest, "add_keywords");
122
128
  case "pages":
123
129
  return call(rest, "list_cited_pages");
124
130
  case "page":
@@ -139,7 +145,7 @@ export async function cmdInsights(ctx) {
139
145
  return call(rest, "select_gsc_property");
140
146
  default:
141
147
  throw new CliError(
142
- `Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, prompts, keywords [topic], pages, page, mentions, portrayal, claims, competitors, question, detection, activity, story, site, post, top, bank, access, properties, property`
148
+ `Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, prompts, keywords [topic], add-keywords, pages, page, mentions, portrayal, claims, competitors, question, detection, activity, story, site, post, top, bank, access, properties, property`
143
149
  );
144
150
  }
145
151
  }
@@ -97,6 +97,22 @@ export const ARGS = {
97
97
  positionals.map((p) => p.toLowerCase().replace("⌘l", "cmd_l").replace("-", "_")),
98
98
  },
99
99
  },
100
+ // No website: Letter builds one on a preview address (`onboarding site "<context>" --brands vercel.com,vanta.com`).
101
+ build_signup_site: {
102
+ context: { value: (_flags, positionals) => positionals.join(" ").trim() || undefined },
103
+ brands: {
104
+ value: (flags) => {
105
+ const brands = flagList(flags.brands).flatMap((b) =>
106
+ b
107
+ .split(",")
108
+ .map((x) => x.trim())
109
+ .filter(Boolean)
110
+ );
111
+ return brands.length ? brands : undefined;
112
+ },
113
+ },
114
+ backend: { flag: "backend", enum: ["repo", "none", "not_app"] },
115
+ },
100
116
  // Step ids are the server's to define (the registry is the authority); forwarded as given.
101
117
  set_onboarding_step: {
102
118
  current_step: "current",
@@ -302,8 +318,10 @@ export async function cmdOnboarding(ctx) {
302
318
  return onboardingStep(rest);
303
319
  case "for":
304
320
  return onboardingFor(rest);
321
+ case "site":
322
+ return onboardingSite(rest);
305
323
  default:
306
- throw new CliError(`Unknown onboarding subcommand: ${sub ?? "(none)"}. Try: status, for, step`);
324
+ throw new CliError(`Unknown onboarding subcommand: ${sub ?? "(none)"}. Try: status, for, site, step`);
307
325
  }
308
326
  }
309
327
 
@@ -341,6 +359,21 @@ async function onboardingFor(ctx) {
341
359
  return 0;
342
360
  }
343
361
 
362
+ /**
363
+ * `onboarding site ["<what you're building>"] [--brands a.com,b.com] [--backend repo|none|not_app]`: no website yet, so
364
+ * Letter builds one on a preview address, nothing bought (build_signup_site). Prints where the site is and the path.
365
+ */
366
+ async function onboardingSite(ctx) {
367
+ const { client, flags, io, positionals } = ctx;
368
+ const args = argsFromFlags(ARGS.build_signup_site, flags, positionals);
369
+ const result = await client.callTool("build_signup_site", args);
370
+ ok(ctx, "Building your website.");
371
+ printResult(io, flags, result, (r) =>
372
+ [`${r.app.name}: ${r.app.stage_note ?? r.app.stage}`, ...signupPathLines(r.path)].join("\n")
373
+ );
374
+ return 0;
375
+ }
376
+
344
377
  async function onboardingStep(ctx) {
345
378
  const { client, flags, io } = ctx;
346
379
  const args = argsFromFlags(ARGS.set_onboarding_step, flags);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.125",
3
+ "version": "0.177.127",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",