@letterstory/cli 0.177.26 → 0.177.28
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 +7 -5
- package/lib/commands/automate.mjs +2 -0
- package/lib/commands/replicate.mjs +4 -2
- package/lib/commands/visits.mjs +16 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
89
89
|
|
|
90
90
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
91
|
-
export const VERSION = "0.177.
|
|
91
|
+
export const VERSION = "0.177.28";
|
|
92
92
|
|
|
93
93
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
94
94
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -241,6 +241,7 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
241
241
|
// ask --more: every row that fits, not only the top ones.
|
|
242
242
|
"more",
|
|
243
243
|
"preview",
|
|
244
|
+
"keep-preview",
|
|
244
245
|
"with-preview",
|
|
245
246
|
// repo …: the repo is a GitLab project (--repo group/subgroup/project).
|
|
246
247
|
"gitlab",
|
|
@@ -710,7 +711,7 @@ Reviewers:
|
|
|
710
711
|
[--event <name>] [--kind post|landing] [--competitor <host>] [--site <host>]
|
|
711
712
|
[--every <n> --unit hours|days|weeks|months] [--facts <a,b>] [--recipe <id>]
|
|
712
713
|
[--fit-run <run-id> --publication-host <site>]
|
|
713
|
-
[--hot-leads-only] [--per-day <n>] [--backfill all|<YYYY-MM-DD>] [--off]
|
|
714
|
+
[--hot-leads-only] [--icp] [--per-day <n>] [--backfill all|<YYYY-MM-DD>] [--off]
|
|
714
715
|
Make one (a template fills what you leave out): it starts
|
|
715
716
|
from now (--backfill also runs it on past events, oldest
|
|
716
717
|
first), acts on its own, and posts each event it acts on
|
|
@@ -2012,7 +2013,7 @@ Visits (Visitors: AI agents reading your site, and AI answers sending people to
|
|
|
2012
2013
|
Who was identified, and who fits your ICP
|
|
2013
2014
|
visits compare <agent-a> <agent-b> [--since 7d] [--path '/docs/*'] [--purpose <p>]
|
|
2014
2015
|
Pages one agent read that the other didn't
|
|
2015
|
-
visits export [--since 30d] [--format json|csv] [--table agent_visits|citations]
|
|
2016
|
+
visits export [--since 30d] [--format json|csv] [--table agent_visits|citations] [--include agents|people|companies] [--icp|--not-icp]
|
|
2016
2017
|
visits sites Your Visitors sites and their install checks
|
|
2017
2018
|
visits domain <domain> [--site <id>] [--name <n>] Move a site to a new domain, keeping its key
|
|
2018
2019
|
visits pages [--since 28d] [--path '/docs/*'] [--agent <id>] [--limit <n>] [--site <id>]
|
|
@@ -2119,16 +2120,17 @@ Bench (Benches: open-source benchmarks on their own domains, kept running; @lett
|
|
|
2119
2120
|
bench replicate <id> REPLICATE.md: how an agent reproduces the results
|
|
2120
2121
|
|
|
2121
2122
|
Replicate (the Replicator: a website rebuilt as a native Next.js repo, page for page; free, within fair-use limits):
|
|
2122
|
-
replicate <https://site> [--max-pages <n>] [--refine-budget <usd>] [--repo-name <r>] [--repo-owner <o>]
|
|
2123
|
+
replicate <https://site> [--max-pages <n>] [--path <p>]… [--refine-budget <usd>] [--repo-name <r>] [--repo-owner <o>]
|
|
2123
2124
|
Capture every page, rebuild it, compare it pixel by pixel
|
|
2124
2125
|
replicate [list] Your replications: stage, how closely each matches, preview link;
|
|
2125
2126
|
the limits (in progress, pages this month, preview days)
|
|
2126
2127
|
replicate show <id> [--failing] Pages with their routes and pixel match; collections; events
|
|
2127
2128
|
replicate attach <id> <repo-name> [--repo-owner <o>] The repo to commit it into (yours; Letter never creates it)
|
|
2128
|
-
replicate advance <id> [--retry] [--again] [--preview] [--extend-preview <days>]
|
|
2129
|
+
replicate advance <id> [--retry] [--again] [--preview] [--extend-preview <days>] [--keep-preview]
|
|
2129
2130
|
Move it on now; --retry once blocked_on is done (checks the tag or TXT record);
|
|
2130
2131
|
--again replicates from the start; --preview deploys its staging link again;
|
|
2131
2132
|
--extend-preview keeps the preview up longer (Letter's team only)
|
|
2133
|
+
--keep-preview keeps it up with no expiry (Letter's team only)
|
|
2132
2134
|
replicate archive <id> Stop it and take its preview down; the project stays in storage and in the repo
|
|
2133
2135
|
replicate forms [<id>] [--form <f>] [--limit <n>] [--before <iso>]
|
|
2134
2136
|
What people sent through the replicated sites' forms, newest first;
|
|
@@ -48,6 +48,8 @@ const triggerParams = {
|
|
|
48
48
|
competitors: { flag: "competitor", type: "list" },
|
|
49
49
|
hosts: { flag: "site", type: "list" },
|
|
50
50
|
hot_leads_only: { flag: "hot-leads-only", type: "bool" },
|
|
51
|
+
// --icp: only people who fit the company's ICP (visitor_identified), checked against their stored fit.
|
|
52
|
+
icp: { flag: "icp", type: "bool" },
|
|
51
53
|
event: { flag: "event" },
|
|
52
54
|
per_day: { flag: "per-day", type: "num" },
|
|
53
55
|
// --trigger schedule --every 2 --unit weeks: a recurring automation, on the calendar (Monday, the 1st).
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
// attach_replication_repo, advance_replication, archive_replication, list_form_submissions), the
|
|
7
7
|
// same lib functions the app calls.
|
|
8
8
|
//
|
|
9
|
-
// letterstory replicate https://example.com [--max-pages 300] [--refine-budget 25] [--repo-name example-site] [--repo-owner <account>]
|
|
9
|
+
// letterstory replicate https://example.com [--max-pages 300] [--path /pricing --path /about] [--refine-budget 25] [--repo-name example-site] [--repo-owner <account>]
|
|
10
10
|
// letterstory replicate list
|
|
11
11
|
// letterstory replicate show <id> [--failing]
|
|
12
12
|
// letterstory replicate attach <id> <repo-name> [--repo-owner <account>]
|
|
13
|
-
// letterstory replicate advance <id> [--retry] [--again] [--preview] [--extend-preview <days>]
|
|
13
|
+
// letterstory replicate advance <id> [--retry] [--again] [--preview] [--extend-preview <days>] [--keep-preview]
|
|
14
14
|
// letterstory replicate archive <id>
|
|
15
15
|
// letterstory replicate forms [<id>] [--form <form>] [--limit <n>] [--before <iso>]
|
|
16
16
|
// letterstory replicate forms <id> --show-key (admins: LETTER_FORMS_URL and LETTER_FORMS_KEY to host it yourself)
|
|
@@ -24,6 +24,7 @@ export const ARGS = {
|
|
|
24
24
|
create_replication: {
|
|
25
25
|
url: { positional: 0, label: "url", required: true },
|
|
26
26
|
max_pages: { flag: "max-pages", type: "num" },
|
|
27
|
+
paths: { flag: "path", type: "list" },
|
|
27
28
|
refine_budget_usd: { flag: "refine-budget", type: "num" },
|
|
28
29
|
repo_name: "repo-name",
|
|
29
30
|
repo_owner: "repo-owner",
|
|
@@ -44,6 +45,7 @@ export const ARGS = {
|
|
|
44
45
|
again: { flag: "again", type: "bool" },
|
|
45
46
|
preview: { flag: "preview", type: "bool" },
|
|
46
47
|
extend_preview_days: { flag: "extend-preview", type: "num" },
|
|
48
|
+
keep_preview: { flag: "keep-preview", type: "bool" },
|
|
47
49
|
},
|
|
48
50
|
archive_replication: { replication_id: replicationId },
|
|
49
51
|
get_replication_forms_key: { replication_id: replicationId },
|
package/lib/commands/visits.mjs
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
// letterstory visits people --since 30d [--path /pricing] people who read the site, and how many were identified
|
|
12
12
|
// letterstory visits who --icp [--category Investors] [--path /pricing] who was identified (--icp: who fits your ICP)
|
|
13
13
|
// letterstory visits export --since 30d --format csv
|
|
14
|
+
// letterstory visits export --include people --icp > icp.csv the people who fit your ICP, as Humans shows them
|
|
14
15
|
// letterstory visits sites
|
|
15
16
|
// letterstory visits domain composal.com [--site <id>] move the site to a new domain, keeping its key
|
|
16
17
|
// letterstory visits pages --since 28d [--path '/docs/*'] [--agent openai-crawler]
|
|
@@ -77,7 +78,15 @@ export const ARGS = {
|
|
|
77
78
|
path: "path",
|
|
78
79
|
purpose: { flag: "purpose", enum: PURPOSES },
|
|
79
80
|
},
|
|
80
|
-
visitors_export: {
|
|
81
|
+
visitors_export: {
|
|
82
|
+
site_id: "site",
|
|
83
|
+
days,
|
|
84
|
+
format: { flag: "format", enum: ["json", "csv"] },
|
|
85
|
+
include: { flag: "include", enum: ["agents", "people", "companies"] },
|
|
86
|
+
icp: { flag: "icp", type: "bool", negate: "not-icp" },
|
|
87
|
+
category: "category",
|
|
88
|
+
path: "path",
|
|
89
|
+
},
|
|
81
90
|
};
|
|
82
91
|
|
|
83
92
|
/** `7d`, `7`, `2w` → days (1-90). Absent → undefined (the tool's default, 30). */
|
|
@@ -362,6 +371,12 @@ async function visitsCompare(ctx) {
|
|
|
362
371
|
async function visitsExport(ctx) {
|
|
363
372
|
const { flags, io } = ctx;
|
|
364
373
|
const result = await call(ctx, "visitors_export");
|
|
374
|
+
// People or companies: the CSV, as the Humans or Companies tab exports it (pipe to a file).
|
|
375
|
+
if (result.include === "people" || result.include === "companies") {
|
|
376
|
+
if (flags.json) io.log(JSON.stringify(result, null, 2));
|
|
377
|
+
else io.log(result.include === "people" ? result.csv_people : result.csv_companies);
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
365
380
|
if (flagStr(flags.format) === "csv" && !flags.json && result.csv) {
|
|
366
381
|
// --table picks one; default is agent visits (pipe to a file).
|
|
367
382
|
const table = flagStr(flags.table) ?? "agent_visits";
|