@letterstory/cli 0.177.216 → 0.177.218

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.216";
96
+ export const VERSION = "0.177.218";
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;
@@ -1683,6 +1683,8 @@ Org (the account as one file, its integrations and billing):
1683
1683
  CLI and following Letter; claim one, once per org
1684
1684
  org billing invoices Every invoice (paid, open, failed, refunded) and the
1685
1685
  next one: when it issues and what it comes to
1686
+ org billing work-email <email> Use a work email: for a workspace whose free tokens
1687
+ wait on one (signed up with free mail)
1686
1688
  org linear [teams [--team <id|key>] | set --team <id|key> [--project <id>|none] | disconnect]
1687
1689
  Where Letter files Linear issues (connect in Settings)
1688
1690
  org diff <file|dir> What applying a bundle would change (reads only)
@@ -2189,6 +2191,7 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
2189
2191
  visits export [--since 30d] [--format json|csv] [--table agent_visits|citations] [--include agents|people|companies] [--icp|--not-icp]
2190
2192
  visits sites Your Visitors sites and their install checks
2191
2193
  visits domain <domain> [--site <id>] [--name <n>] Move a site to a new domain, keeping its key
2194
+ visits send-install <email> [--site <id>] Email the install to whoever runs the coding agent
2192
2195
  visits pages [--since 28d] [--path '/docs/*'] [--agent <id>] [--limit <n>] [--site <id>]
2193
2196
  People and AI agents per page
2194
2197
  visits health --site <id> Staff: how far to trust a site's numbers, each check and its fix
@@ -53,6 +53,7 @@ export const ARGS = {
53
53
  cancel_billing_plan: { reason: { flag: "why" } },
54
54
  undo_billing_plan_cancel: {},
55
55
  update_billing_card: {},
56
+ use_work_email: { email: { positional: 0, label: "email", required: true } },
56
57
  list_integrations: {},
57
58
  get_workspace_overview: {
58
59
  needs_only: {
@@ -195,7 +196,8 @@ const usd = (n) => formatMoney(n, { cents: true });
195
196
  * it is past due, and its failed payments (get_billing_payments). `org billing cap <dollars|off>`
196
197
  * sets the cap (set_billing_spend_cap, admins); `org billing card` links to Stripe's page for a new
197
198
  * card (update_billing_card, admins); `org billing keep` takes back a cancel set for the period's end
198
- * (undo_billing_plan_cancel, admins); `org billing request` asks the admins for more
199
+ * (undo_billing_plan_cancel, admins); `org billing work-email <email>` changes the creator's account email to a work
200
+ * email for a workspace held for free mail (use_work_email); `org billing request` asks the admins for more
199
201
  * (request_billing_tokens); `org billing usage` is this period by product and collection (get_billing);
200
202
  * `org billing invoices` is what was charged and the next invoice (get_billing_invoices).
201
203
  */
@@ -247,6 +249,15 @@ async function orgBilling(ctx) {
247
249
  );
248
250
  return 0;
249
251
  }
252
+ if (positionals[0] === "work-email") {
253
+ refuseUnknownFlags(ctx, ARGS.use_work_email, []);
254
+ const result = await client.callTool(
255
+ "use_work_email",
256
+ argsFromFlags(ARGS.use_work_email, flags, positionals.slice(1))
257
+ );
258
+ printResult(io, flags, result, (r) => `${r.message}: ${r.email}`);
259
+ return 0;
260
+ }
250
261
  if (positionals[0] === "request") {
251
262
  refuseUnknownFlags(ctx, ARGS.request_billing_tokens, []);
252
263
  const result = await client.callTool(
@@ -17,6 +17,7 @@
17
17
  // letterstory visits export --include people --icp > icp.csv the people who fit your ICP, as Humans shows them
18
18
  // letterstory visits sites [--install] (--install adds each site's script)
19
19
  // letterstory visits domain composal.com [--site <id>] move the site to a new domain, keeping its key
20
+ // letterstory visits send-install sam@acme.com [--site <id>] email the install to whoever runs the coding agent
20
21
  // letterstory visits pages --since 28d [--path '/docs/*'] [--agent openai-crawler]
21
22
  // letterstory visits health --site <id> staff: how far to trust a site's numbers, and what to fix
22
23
  // letterstory visits agent-sites [--include-test] [--figures] [--from <ISO>] [--to <ISO>]
@@ -92,6 +93,10 @@ export const ARGS = {
92
93
  domain: { positional: 0, label: "new domain (e.g. acme.com)", required: true },
93
94
  name: "name",
94
95
  },
96
+ visitors_send_install: {
97
+ site_id: "site",
98
+ email: { positional: 0, label: "email of whoever runs the coding agent", required: true },
99
+ },
95
100
  visitors_get_agent_visits: {
96
101
  site_id: "site",
97
102
  days,
@@ -337,6 +342,8 @@ export async function cmdVisits(ctx) {
337
342
  return visitsSites(rest);
338
343
  case "domain":
339
344
  return visitsDomain(rest);
345
+ case "send-install":
346
+ return visitsSendInstall(rest);
340
347
  case "pages":
341
348
  return visitsPages(rest);
342
349
  case "health":
@@ -355,7 +362,7 @@ export async function cmdVisits(ctx) {
355
362
  return visitsTransact(rest);
356
363
  default:
357
364
  throw new CliError(
358
- "Usage: visits [list|requests|citations|people|who|path|compare|export|sites|domain|pages|health|agent-sites|connect|connectors|disconnect|shortcut|transact]"
365
+ "Usage: visits [list|requests|citations|people|who|path|compare|export|sites|domain|send-install|pages|health|agent-sites|connect|connectors|disconnect|shortcut|transact]"
359
366
  );
360
367
  }
361
368
  }
@@ -894,6 +901,18 @@ async function visitsDomain(ctx) {
894
901
  return 0;
895
902
  }
896
903
 
904
+ async function visitsSendInstall(ctx) {
905
+ const { flags, io } = ctx;
906
+ const result = await call(ctx, "visitors_send_install");
907
+ printResult(io, flags, result, (r) =>
908
+ [
909
+ `Sent to ${r.email}${r.invited ? " (invited to the workspace)" : ""}.`,
910
+ ...(r.email_sent ? [] : [`The email didn't go. Share this link: ${r.link}`]),
911
+ ].join("\n")
912
+ );
913
+ return 0;
914
+ }
915
+
897
916
  async function visitsSites(ctx) {
898
917
  const { flags, io } = ctx;
899
918
  const result = await call(ctx, "visitors_list_sites");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.216",
3
+ "version": "0.177.218",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",