@letterstory/cli 0.62.0 → 0.63.1
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 +6 -0
- package/lib/cli.mjs +3 -2
- package/lib/commands/insights.mjs +10 -3
- package/lib/commands/posts.mjs +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -144,6 +144,7 @@ letterstory phantom domain connect <phantom-id> myblog.com # attach one you
|
|
|
144
144
|
letterstory posts list [--limit <n>] [--collection <uuid>]
|
|
145
145
|
letterstory posts show <article-id>
|
|
146
146
|
letterstory posts new --title "…" --collection <uuid> --body "…" [--article-id <uuid>] # or --file <path|->; --article-id updates that article instead of creating one
|
|
147
|
+
letterstory posts new --title "…" --collection <uuid> --body "…" --context "Internal data from 120 accounts: disputes fell 38%." # your own data: stated in the post with your attribution
|
|
147
148
|
letterstory posts publish <article-id>
|
|
148
149
|
letterstory posts unpublish <article-id>
|
|
149
150
|
letterstory posts delete --id <uuid> [--id <uuid> ...] # permanent; content, history, and any published copy are all removed
|
|
@@ -725,6 +726,11 @@ letterstory insights top [--period 14d|30d|90d] [--collection <uuid>] [--limit <
|
|
|
725
726
|
AI visibility and page access — the Measure tabs' reads, for scripts and agents:
|
|
726
727
|
|
|
727
728
|
```bash
|
|
729
|
+
# The Measure Overview: how often AI answers name you and cite your pages (rates
|
|
730
|
+
# with 95% intervals and gated trends), share of voice, search for your site and
|
|
731
|
+
# the phantom network kept apart, and each ranking target's standing.
|
|
732
|
+
letterstory insights summary [--period 14d|30d|90d]
|
|
733
|
+
|
|
728
734
|
# The AI Visibility Bank: which questions named you, cited your pages, or both (a
|
|
729
735
|
# breakthrough). All time unless --period; --source picks the phantom network
|
|
730
736
|
# (default), your marketing site, or the whole portfolio; --phantom narrows to
|
package/lib/cli.mjs
CHANGED
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./commands.mjs";
|
|
56
56
|
|
|
57
57
|
// Keep in sync with cli/package.json.
|
|
58
|
-
export const VERSION = "0.
|
|
58
|
+
export const VERSION = "0.63.1";
|
|
59
59
|
|
|
60
60
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
61
61
|
// can't accidentally swallow the id as --json's value.
|
|
@@ -240,7 +240,7 @@ Phantomstory (a collection Letterstory hosts as an independent publication):
|
|
|
240
240
|
Content:
|
|
241
241
|
posts list [--limit <n>] [--collection <uuid>] List your articles
|
|
242
242
|
posts show <article-id> Show one article
|
|
243
|
-
posts new --title <t> --collection <uuid> (--body <text> | --file <path|->) [--article-id <uuid>]
|
|
243
|
+
posts new --title <t> --collection <uuid> (--body <text> | --file <path|->) [--article-id <uuid>] [--context <text>]
|
|
244
244
|
posts publish <article-id> Publish an article
|
|
245
245
|
posts unpublish <article-id> Unpublish an article
|
|
246
246
|
posts delete --id <uuid> [--id <uuid> ...] Permanently delete article(s)
|
|
@@ -862,6 +862,7 @@ Mail:
|
|
|
862
862
|
mail postal-address "<address>" Set the org's CAN-SPAM mailing address (email footers)
|
|
863
863
|
|
|
864
864
|
Insights:
|
|
865
|
+
insights summary [--period 14d|30d|90d] Measure Overview: AI named/cited rates, share of voice, search, targets
|
|
865
866
|
insights site [--period 14d|30d|90d] [--collection <uuid>]
|
|
866
867
|
insights post <article-id> [--period 14d|30d|90d]
|
|
867
868
|
insights top [--period 14d|30d|90d] [--collection <uuid>] [--limit <n>] [--sort clicks|impressions]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// `insights` — Search Console impressions/clicks across the phantom network, at the
|
|
2
2
|
// network, single-post, and top-posts levels (ported from phantomstory-cli's
|
|
3
|
-
// insights.ts); plus Measure's AI Visibility Bank (`bank`)
|
|
4
|
-
// Access (`access`) — the same reads the web app's Measure tabs render.
|
|
3
|
+
// insights.ts); plus Measure's Overview (`summary`), AI Visibility Bank (`bank`)
|
|
4
|
+
// and phantom Page Access (`access`) — the same reads the web app's Measure tabs render.
|
|
5
5
|
|
|
6
6
|
import { CliError } from "../client.mjs";
|
|
7
7
|
import { flagStr, flagNum, requirePositional, printResult, compact, argsFromFlags } from "./shared.mjs";
|
|
@@ -19,6 +19,9 @@ export const ARGS = {
|
|
|
19
19
|
period: { flag: "period", enum: PERIODS },
|
|
20
20
|
collection_id: { flag: "collection" },
|
|
21
21
|
},
|
|
22
|
+
get_measure_summary: {
|
|
23
|
+
period: { flag: "period", enum: PERIODS },
|
|
24
|
+
},
|
|
22
25
|
};
|
|
23
26
|
|
|
24
27
|
export async function cmdInsights(ctx) {
|
|
@@ -35,8 +38,12 @@ export async function cmdInsights(ctx) {
|
|
|
35
38
|
return call(rest, "get_ai_visibility_bank");
|
|
36
39
|
case "access":
|
|
37
40
|
return call(rest, "get_page_access");
|
|
41
|
+
case "summary":
|
|
42
|
+
return call(rest, "get_measure_summary");
|
|
38
43
|
default:
|
|
39
|
-
throw new CliError(
|
|
44
|
+
throw new CliError(
|
|
45
|
+
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, site, post, top, bank, access`
|
|
46
|
+
);
|
|
40
47
|
}
|
|
41
48
|
}
|
|
42
49
|
|
package/lib/commands/posts.mjs
CHANGED
|
@@ -73,7 +73,9 @@ async function postsNew(ctx) {
|
|
|
73
73
|
const body = readBodyInput(flags);
|
|
74
74
|
if (!body) throw new CliError("Provide --body or --file <path>.");
|
|
75
75
|
const articleId = flagStr(flags["article-id"]);
|
|
76
|
-
|
|
76
|
+
// Steering and/or your own data: figures in it are stated in the post with your attribution.
|
|
77
|
+
const context = flagStr(flags.context);
|
|
78
|
+
const args = compact({ title, body, collection_id: collection, article_id: articleId, context });
|
|
77
79
|
const result = await client.callTool("ingest_article", args);
|
|
78
80
|
ok(ctx, articleId ? `Updated "${title}".` : `Created draft "${title}".`);
|
|
79
81
|
printResult(io, flags, result);
|