seoanything-cli 2.4.0 → 2.4.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 +1 -1
- package/dist/tools.mjs +10 -9
- package/package.json +1 -1
- package/src/cli.js +4 -4
- package/src/cli.test.js +3 -3
- package/src/mcp.js +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ npx seoanything mcp # stdio MCP server (Node ≥ 22.18)
|
|
|
21
21
|
| `trends daily\|realtime [--geo NP] [--hl en] [--limit 20] [--hours 4] [--local]` | Trending searches; `--local` fetches from your machine with google-trends-js |
|
|
22
22
|
| `keywords suggest\|interest\|cluster "<seed>" [--period "today 12-m"] [--geo US]` | Keyword research (`interest` takes a comma list of ≤5; `suggest` names the engines behind each idea) |
|
|
23
23
|
| `keywords lists [<list id>]` · `keywords target <list id> <keyword id> <url\|none>` | Your saved keyword lists; set or clear the page on your site meant to rank for a keyword |
|
|
24
|
-
| `plan topics` |
|
|
24
|
+
| `plan topics [--calendar <id>]` | A content calendar by topic (the first calendar by default): Search Console clicks, impressions and position, and the channels each topic went out on |
|
|
25
25
|
| `topics [--day YYYY-MM-DD]` | Topic Radar across Google, GitHub and GitLab |
|
|
26
26
|
| `repos trending [--source all] [--window 7d] [--language ts] [--topic seo]` | Trending repositories |
|
|
27
27
|
| `chat ["question"] [--mode keywords] [--model fast]` | One-shot answer, or a REPL with `/mode`, `/model`, `/new`, `/exit` |
|
package/dist/tools.mjs
CHANGED
|
@@ -126,9 +126,9 @@ function httpApi(baseUrl, auth, send = (url, init) => fetch(url, init)) {
|
|
|
126
126
|
planSettings: (a) => request("PUT", "/plan/settings", a),
|
|
127
127
|
// plain JSON, not a stream: the answer is the finished research
|
|
128
128
|
researchRun: async (a) => (await raw("POST", "/plan/research", a, "application/json")).json(),
|
|
129
|
-
researchList: () => request("GET",
|
|
129
|
+
researchList: (a) => request("GET", `/plan/research${qs(a ?? {})}`),
|
|
130
130
|
researchDecide: (a) => a.action === "reject" ? request("POST", `/plan/research/${encodeURIComponent(a.id)}/reject`).then(() => ({ status: "rejected" })) : request("POST", `/plan/research/${encodeURIComponent(a.id)}/approve`, { reject: a.reject ?? [], fill: a.fill ?? false, targets: a.targets }),
|
|
131
|
-
planTopics: () => request("GET",
|
|
131
|
+
planTopics: (a) => request("GET", `/plan/topics${qs(a ?? {})}`),
|
|
132
132
|
keywordLists: (a) => request("GET", a.listId ? `/keyword-lists/${encodeURIComponent(a.listId)}` : "/keyword-lists"),
|
|
133
133
|
keywordTarget: (a) => request("PATCH", `/keyword-lists/${encodeURIComponent(a.listId)}/keywords/${encodeURIComponent(a.keywordId)}`, { targetUrl: a.targetUrl }),
|
|
134
134
|
blogResults: (a) => request("GET", `/blog/posts/${encodeURIComponent(a.postId)}/results`),
|
|
@@ -162,6 +162,7 @@ var siteId = z.string().regex(/^[a-f0-9]{16,32}$/, "a site id from site_list").d
|
|
|
162
162
|
var orgId = z.string().regex(/^[a-f0-9]{16,32}$/, "an organization id from orgdna_list").describe("organization id from orgdna_list");
|
|
163
163
|
var entityType = z.enum(["organization", "brand", "website", "product", "service", "segment", "problem", "intent", "keyword", "question", "topic", "page", "competitor", "industry", "location", "technology", "channel", "opportunity", "risk", "issue"]);
|
|
164
164
|
var planId = z.string().regex(/^[a-f0-9]{16,32}$/, "an item id from plan_list").describe("plan item id from plan_list");
|
|
165
|
+
var calendar = z.string().regex(/^[a-f0-9]{16,32}$/, "a calendar id from plan_list").optional().describe("content calendar id from plan_list (one calendar per project); the first calendar when left out");
|
|
165
166
|
var dayStr = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "a date as YYYY-MM-DD").describe("a UTC date as YYYY-MM-DD");
|
|
166
167
|
var postId = z.string().regex(/^[a-f0-9]{16,32}$/, "a post id from blog_list").describe("post id from blog_list");
|
|
167
168
|
var listId = z.string().regex(/^[a-f0-9]{16,32}$/, "a keyword list id from keyword_lists").describe("keyword list id from keyword_lists (an approved research returns one)");
|
|
@@ -206,16 +207,16 @@ var TOOLS = [
|
|
|
206
207
|
def({ name: "site_task", title: "Set finding status", description: "Set the task status of one finding on one of your sites: open, in_progress, fixed or dismissed (rule id from site_findings). Marking it fixed records the current count so the next crawl can confirm the fix.", input: z.object({ siteId, rule: z.string().regex(/^[a-z0-9_]{2,40}$/, "a rule id from site_findings").describe("finding rule id from site_findings, e.g. title_missing"), status: z.enum(["open", "in_progress", "fixed", "dismissed"]) }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.siteTask(a) }),
|
|
207
208
|
// the content plan and keyword research (the same routes the app's plan page uses). Nothing here publishes a post:
|
|
208
209
|
// a draft waits for its author's review in the app.
|
|
209
|
-
def({ name: "plan_list", title: "Content plan", description: "
|
|
210
|
-
def({ name: "plan_add", title: "Plan a keyword", description: "Put a keyword on a free day of
|
|
210
|
+
def({ name: "plan_list", title: "Content plan", description: "One of your content calendars (one per project; the first when none is named): one keyword a day, each with its state (planned, running, done, failed) and its post once written, plus whether autopilot, the weekly refresh and header images are on, and all your calendars with their ids. Days are UTC dates.", input: z.object({ from: dayStr.optional(), to: dayStr.optional(), calendar }), annotations: ro(), surfaces: RL, run: (c, a) => c.api.planList(a) }),
|
|
211
|
+
def({ name: "plan_add", title: "Plan a keyword", description: "Put a keyword on a free day of a content calendar (today or later). A day of a calendar holds one keyword, and a keyword is planned once per calendar.", input: z.object({ term: z.string().trim().min(1).max(120).describe("the keyword to write about"), day: dayStr, calendar }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.planAdd(a) }),
|
|
211
212
|
def({ name: "plan_move", title: "Move a planned keyword", description: "Move a planned item to another free day (today or later). An item being written or already written stays where it is.", input: z.object({ id: planId, day: dayStr }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.planMove(a) }),
|
|
212
|
-
def({ name: "plan_fill", title: "Fill the plan from a keyword list", description: "Lay one of your saved keyword lists over the free days of the next N days: topics rotate, each pillar keyword first, and keywords already planned or written are skipped.", input: z.object({ listId: z.string().regex(/^[a-f0-9]{16,32}$/, "a keyword list id").describe("keyword list id (an approved research returns one)"), days: z.number().int().min(1).max(90).default(30) }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.planFill(a) }),
|
|
213
|
+
def({ name: "plan_fill", title: "Fill the plan from a keyword list", description: "Lay one of your saved keyword lists over the free days of a content calendar for the next N days: topics rotate, each pillar keyword first, and keywords already planned on that calendar or written are skipped.", input: z.object({ listId: z.string().regex(/^[a-f0-9]{16,32}$/, "a keyword list id").describe("keyword list id (an approved research returns one)"), days: z.number().int().min(1).max(90).default(30), calendar }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.planFill(a) }),
|
|
213
214
|
def({ name: "plan_write", title: "Write a planned draft now", description: "Start writing the draft for one planned item: brief, outline, sections and the SEO pass. It runs in the background for a few minutes; read its state later with plan_list. The draft is not published. Counts against the daily post and section allowances.", input: z.object({ id: planId }), annotations: rw(true), surfaces: RL, run: (c, a) => c.api.planWrite(a) }),
|
|
214
|
-
def({ name: "plan_settings", title: "Content plan switches", description: "Turn the plan's switches on or off: autopilot (the
|
|
215
|
-
def({ name: "research_run", title: "Research keywords for a goal", description: "Research keywords for a goal in your own words: real search suggestions grouped into clusters, without the keywords you already have. The result waits for review (research_decide); nothing is saved to your lists or plan. Takes about a minute. No search volume or difficulty. Counts against the daily keyword cluster allowance.", input: z.object({ goal: z.string().trim().min(10).max(400).describe("what you want to rank for, a product you are launching, or an audience"), geo }), annotations: rw(true), surfaces: RL, run: (c, a) => c.api.researchRun(a) }),
|
|
216
|
-
def({ name: "research_list", title: "Keyword research runs", description: "
|
|
215
|
+
def({ name: "plan_settings", title: "Content plan switches", description: "Turn the plan's switches on or off: autopilot (the calendar's keyword of the day is written as a draft each morning, UTC) and images (a generated header photo for each draft) for one content calendar, and refresh (once a week the finished post losing the most clicks is rewritten as a proposal) for your whole account. Only the switches you send change.", input: z.object({ autopilot: z.boolean().optional(), refresh: z.boolean().optional(), images: z.boolean().optional(), calendar }).refine((b) => [b.autopilot, b.refresh, b.images].some((v) => v !== void 0), "send at least one switch"), annotations: rw(), surfaces: RL, run: (c, a) => c.api.planSettings(a) }),
|
|
216
|
+
def({ name: "research_run", title: "Research keywords for a goal", description: "Research keywords for a goal in your own words: real search suggestions grouped into clusters, without the keywords you already have. The result waits for review (research_decide); nothing is saved to your lists or plan. Approving it with fill plans it on the calendar it was made for. Takes about a minute. No search volume or difficulty. Counts against the daily keyword cluster allowance.", input: z.object({ goal: z.string().trim().min(10).max(400).describe("what you want to rank for, a product you are launching, or an audience"), geo, calendar }), annotations: rw(true), surfaces: RL, run: (c, a) => c.api.researchRun(a) }),
|
|
217
|
+
def({ name: "research_list", title: "Keyword research runs", description: "The recent keyword research runs of one content calendar (the first when none is named), with their clusters and state: ready (waiting for review), approved or rejected.", input: z.object({ calendar }), annotations: ro(), surfaces: RL, run: (c, a) => c.api.researchList(a) }),
|
|
217
218
|
def({ name: "research_decide", title: "Approve or reject a research", description: "Decide a research that is ready: approve saves its clusters as a keyword list (leave clusters out by their position in `reject`, starting at 0) and, with fill, plans them on the free days; reject closes it without saving anything.", input: z.object({ id: z.string().regex(/^[a-f0-9]{16,32}$/, "a research id from research_list").describe("research id from research_list"), action: z.enum(["approve", "reject"]), reject: z.array(z.number().int().min(0).max(50)).max(50).default([]).describe("cluster positions to leave out when approving"), fill: z.boolean().default(false).describe("also plan the kept keywords on the free days"), targets: z.record(z.string().min(1).max(100), z.string().trim().url().max(2e3)).optional().describe("when approving: the page on your own site meant to rank for a keyword, keyed by the keyword") }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.researchDecide(a) }),
|
|
218
|
-
def({ name: "plan_topics", title: "Content plan by topic", description: "
|
|
219
|
+
def({ name: "plan_topics", title: "Content plan by topic", description: "One content calendar (the first when none is named) grouped by topic: keywords planned, written and published per topic, the Search Console clicks, impressions and average position of its posts (latest stored period), and the channels they went out on. searchConsole is false when none of your sites has Search Console data.", input: z.object({ calendar }), annotations: ro(), surfaces: RL, run: (c, a) => c.api.planTopics(a) }),
|
|
219
220
|
def({ name: "keyword_lists", title: "Saved keyword lists", description: "Your saved keyword lists. With listId, one list's keywords with their ids, intent, cluster, the engines that suggested each (google, youtube, duckduckgo; empty when the AI added it, null when unknown) and the target page set for it.", input: z.object({ listId: listId.optional() }), annotations: ro(), surfaces: RL, run: (c, a) => c.api.keywordLists(a) }),
|
|
220
221
|
def({ name: "keyword_target", title: "Set a keyword's target page", description: "Set the page on your own site meant to rank for one saved keyword (ids from keyword_lists), or clear it with null. When your sites are known, the page must be on one of them.", input: z.object({ listId, keywordId: z.string().regex(/^[a-f0-9]{16,32}$/, "a keyword id from keyword_lists").describe("keyword id from keyword_lists"), targetUrl: z.string().trim().url().max(2e3).nullable().describe("the page's full address, or null to clear it") }), annotations: rw(), surfaces: RL, run: (c, a) => c.api.keywordTarget(a) }),
|
|
221
222
|
// results by channel and the content registry (the post editor's distribute and results cards). Numbers are typed in by
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seoanything-cli",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "SEOAnything CLI: trends, keywords, SEO chat, blog studio, audits, a local MCP server, and `connect` to run the web app on the Claude/Codex/Gemini/Antigravity CLI on your own computer. https://www.seoanything.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
package/src/cli.js
CHANGED
|
@@ -16,7 +16,7 @@ const OPTS = {
|
|
|
16
16
|
server: { type: "string" }, "api-key": { type: "string" }, "no-browser": { type: "boolean" }, local: { type: "boolean" }, cloud: { type: "boolean" }, yes: { type: "boolean" },
|
|
17
17
|
geo: { type: "string" }, hl: { type: "string" }, limit: { type: "string" }, hours: { type: "string" }, period: { type: "string" }, day: { type: "string" },
|
|
18
18
|
source: { type: "string" }, window: { type: "string" }, language: { type: "string" }, topic: { type: "string" },
|
|
19
|
-
code: { type: "string" }, background: { type: "boolean" }, video: { type: "boolean" },
|
|
19
|
+
code: { type: "string" }, background: { type: "boolean" }, video: { type: "boolean" }, calendar: { type: "string" },
|
|
20
20
|
mode: { type: "string" }, model: { type: "string" }, keyword: { type: "string" }, words: { type: "string" }, tone: { type: "string" }, out: { type: "string" }, frontmatter: { type: "string" }, format: { type: "string" }, target: { type: "string" },
|
|
21
21
|
replaces: { type: "string" }, views: { type: "string" }, clicks: { type: "string" }, reactions: { type: "string" }, comments: { type: "string" }, shares: { type: "string" },
|
|
22
22
|
force: { type: "boolean" },
|
|
@@ -45,7 +45,7 @@ usage: seoanything <command> [options]
|
|
|
45
45
|
gap <your-site> <competitor> topics their sitemap lists that yours doesn't
|
|
46
46
|
sites [list] | sites findings|opportunities|compare|report|crux <id> your Search Visibility sites: last crawl, Search Console, real-user speed
|
|
47
47
|
sites crawl|sync <id> | sites task <id> <rule> open|in_progress|fixed|dismissed start a crawl, sync Search Console, set a finding's status
|
|
48
|
-
plan topics
|
|
48
|
+
plan topics [--calendar <id>] a content calendar by topic, with Search Console results and channels
|
|
49
49
|
bing [stats] 28 days of Bing Webmaster numbers (key saved in settings › connections)
|
|
50
50
|
topics [--day YYYY-MM-DD]
|
|
51
51
|
repos trending [--source all] [--window 7d] [--language ts] [--topic seo] [--limit 25]
|
|
@@ -197,8 +197,8 @@ export async function main(argv, io = { out: console.log, err: console.error })
|
|
|
197
197
|
return EXIT.ok;
|
|
198
198
|
}
|
|
199
199
|
case "plan": {
|
|
200
|
-
if (p.sub !== "topics") throw new CliError("usage: seoanything plan topics", EXIT.usage);
|
|
201
|
-
const r = await api.get(
|
|
200
|
+
if (p.sub !== "topics") throw new CliError("usage: seoanything plan topics [--calendar <id>]", EXIT.usage);
|
|
201
|
+
const r = await api.get(`/plan/topics${typeof flags.calendar === "string" ? `?calendar=${encodeURIComponent(flags.calendar)}` : ""}`);
|
|
202
202
|
print(r, r.topics.length ? r.topics.map((t) => `${c("1", t.topic)} ${c("2", `${t.keywords} keywords · ${t.written} written · ${t.published} published`)}\n ${t.hasData ? `${t.clicks} clicks · ${t.impressions} impressions · position ${t.position ?? "–"}` : "no search data"}${t.channels.length ? ` · on ${t.channels.join(", ")}` : ""}`).join("\n") + (r.searchConsole ? "" : `\n${c("2", "search console is not connected to any of your sites")}`) : "no plan yet.");
|
|
203
203
|
return EXIT.ok;
|
|
204
204
|
}
|
package/src/cli.test.js
CHANGED
|
@@ -91,7 +91,7 @@ describe("B2 and B3 commands: live links, results by channel, topics, keyword ma
|
|
|
91
91
|
});
|
|
92
92
|
it("plan topics, keyword lists and targets, suggest with engines, crux and bing", async () => {
|
|
93
93
|
const seen = [];
|
|
94
|
-
const answer = (path) => path.
|
|
94
|
+
const answer = (path) => path.includes("/plan/topics") ? { searchConsole: true, topics: [{ topic: "trail shoes", keywords: 3, written: 1, published: 1, clicks: 12, impressions: 300, position: 8.4, hasData: true, channels: ["linkedin"], items: [] }] }
|
|
95
95
|
: path.includes("/keywords/suggest") ? { q: "shoes", found: [{ text: "shoes for trail", engines: ["google", "youtube"] }], suggestions: ["shoes for trail"], engines: ["google", "youtube"] }
|
|
96
96
|
: path.includes("/keywords/") ? { targetUrl: null }
|
|
97
97
|
: path.endsWith("/crux") ? { origin: { origin: "https://example.com", url: null, phone: { ok: true, weeks: [{ end: "2026-11-15", lcp: 2100, inp: 180, cls: 0.05 }] }, desktop: { ok: false, reason: "no_data", message: "not enough data" } }, pages: [] }
|
|
@@ -100,9 +100,9 @@ describe("B2 and B3 commands: live links, results by channel, topics, keyword ma
|
|
|
100
100
|
const outs = [];
|
|
101
101
|
vi.stubGlobal("fetch", async (url, init) => { const path = url.replace("http://sa.test/api/v1", ""); seen.push(`${init.method} ${path}${init.body ? ` ${init.body}` : ""}`); return new Response(JSON.stringify(answer(path)), { headers: { "content-type": "application/json" } }); });
|
|
102
102
|
try {
|
|
103
|
-
for (const argv of [["plan", "topics"], ["keywords", "suggest", "shoes"], ["keywords", "lists"], ["keywords", "target", post, post, "none"], ["sites", "crux", post], ["bing"]]) { const r = await run([...argv, ...srv]); expect(r.code, argv.join(" ")).toBe(0); outs.push(r.out); }
|
|
103
|
+
for (const argv of [["plan", "topics"], ["keywords", "suggest", "shoes"], ["keywords", "lists"], ["keywords", "target", post, post, "none"], ["sites", "crux", post], ["bing"], ["plan", "topics", "--calendar", post]]) { const r = await run([...argv, ...srv]); expect(r.code, argv.join(" ")).toBe(0); outs.push(r.out); }
|
|
104
104
|
} finally { vi.unstubAllGlobals(); }
|
|
105
|
-
expect(seen).toEqual(["GET /plan/topics", "GET /keywords/suggest?q=shoes&hl=en&geo=US", "GET /keyword-lists", `PATCH /keyword-lists/${post}/keywords/${post} {"targetUrl":null}`, `GET /visibility/sites/${post}/crux`, "GET /connections/bing/stats"]);
|
|
105
|
+
expect(seen).toEqual(["GET /plan/topics", "GET /keywords/suggest?q=shoes&hl=en&geo=US", "GET /keyword-lists", `PATCH /keyword-lists/${post}/keywords/${post} {"targetUrl":null}`, `GET /visibility/sites/${post}/crux`, "GET /connections/bing/stats", `GET /plan/topics?calendar=${post}`]);
|
|
106
106
|
expect(outs[0]).toContain("12 clicks · 300 impressions · position 8.4 · on linkedin");
|
|
107
107
|
expect(outs[1]).toContain("shoes for trail · google, youtube");
|
|
108
108
|
expect(outs[3]).toBe("target page cleared.");
|
package/src/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import { CliError } from "./api.js";
|
|
4
4
|
import { resolveCreds } from "./config.js";
|
|
5
5
|
|
|
6
|
-
export const VERSION = "2.4.
|
|
6
|
+
export const VERSION = "2.4.1";
|
|
7
7
|
|
|
8
8
|
export async function mcp(flags) {
|
|
9
9
|
const [major, minor] = process.versions.node.split(".").map(Number);
|