git-paid 2.1.2 → 2.1.4
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 +22 -34
- package/bin/git-paid.js +127 -52
- package/lib/auth.js +866 -208
- package/lib/directories.js +123 -123
- package/lib/engine.js +228 -112
- package/lib/fixer.js +58 -0
- package/lib/inbox.js +359 -72
- package/lib/mcp.js +220 -87
- package/lib/pseo.js +290 -106
- package/lib/safe-fetch.js +239 -0
- package/lib/stateful-mcp.js +16 -4
- package/lib/submitter.js +89 -28
- package/package.json +53 -44
- package/brand/README.md +0 -54
- package/brand/postbuild-icon.png +0 -0
- package/brand/postbuild-icon.svg +0 -14
- package/brand/postbuild-logo.png +0 -0
- package/brand/postbuild-logo.svg +0 -17
- package/lib/stripe.js +0 -554
- package/server.js +0 -252
package/README.md
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
> **`git push` ships your code. `git paid` sells it.**
|
|
4
4
|
>
|
|
5
|
-
>
|
|
5
|
+
> Post-Build Technical SEO, 25-Route Structured SEO Generator, Dedicated `@postbuild.dev` Verification Inbox, 85-Directory Launch Kit & IndexNow Dispatcher, and Stateful MCP Server for AI Coding Agents.
|
|
6
6
|
|
|
7
|
-
- **Web Studio & Live Audit**: [https://postbuild.dev](https://postbuild.dev)
|
|
8
|
-
- **CLI Binary**: `npx git-paid`
|
|
9
|
-
- **MCP Server**: `npx git-paid mcp`
|
|
7
|
+
- **Web Studio & Live Audit**: [https://www.postbuild.dev](https://www.postbuild.dev)
|
|
8
|
+
- **CLI Binary**: `npx git-paid`
|
|
9
|
+
- **MCP Server**: `npx -y git-paid mcp`
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -18,16 +18,16 @@ Run directly from your project root after deploying to Vercel, Railway, Render,
|
|
|
18
18
|
# 1. Run a live technical SEO & monetization readiness audit
|
|
19
19
|
npx git-paid https://your-app.com
|
|
20
20
|
|
|
21
|
-
# 2. Auto-generate & write robots.txt, sitemap.xml, llms.txt, and 25 static
|
|
21
|
+
# 2. Auto-generate & write robots.txt, sitemap.xml, llms.txt, and 25 static SEO HTML pages
|
|
22
22
|
npx git-paid fix https://your-app.com
|
|
23
23
|
|
|
24
|
-
# 3.
|
|
24
|
+
# 3. Prepare your launch kit across 85 curated SaaS/AI directories with IndexNow & form inspection
|
|
25
25
|
npx git-paid submit https://your-app.com --limit 10
|
|
26
26
|
|
|
27
|
-
# 4. Poll your dedicated @postbuild.dev verification inbox
|
|
28
|
-
npx git-paid inbox https://your-app.com
|
|
27
|
+
# 4. Poll your dedicated @postbuild.dev verification inbox for OTPs & confirmation links
|
|
28
|
+
npx git-paid inbox https://your-app.com
|
|
29
29
|
|
|
30
|
-
# 5. Install agent skill files (.agent/skills/postbuild/SKILL.md
|
|
30
|
+
# 5. Install agent skill files (.agent/skills/postbuild/SKILL.md) into your repository
|
|
31
31
|
npx git-paid skill
|
|
32
32
|
```
|
|
33
33
|
|
|
@@ -42,30 +42,30 @@ git paid https://your-app.com
|
|
|
42
42
|
|
|
43
43
|
## What `git-paid` Automates After You Ship
|
|
44
44
|
|
|
45
|
-
| Capability | Manual Post-Build Workflow | `git-paid` (`postbuild.dev`) |
|
|
45
|
+
| Capability | Manual Post-Build Workflow | `git-paid` (`www.postbuild.dev`) |
|
|
46
46
|
| :--- | :--- | :--- |
|
|
47
47
|
| **Technical & AI Search SEO** | Hand-writing meta tags, JSON-LD, and crawler rules | Writes `robots.txt` (`OAI-SearchBot`, `PerplexityBot`, `ClaudeBot`), `sitemap.xml`, `llms.txt`, and `SoftwareApplication` JSON-LD in 1 command |
|
|
48
|
-
| **25
|
|
49
|
-
| **85-Directory
|
|
50
|
-
| **Verification Inbox (`@postbuild.dev`)** | Clutters personal inbox with 85+ confirmation emails | Provisions `<slug
|
|
51
|
-
| **Self-Serve Stripe Checkout Gate** | Custom billing boilerplate | Drop-in
|
|
48
|
+
| **25 Structured SEO Pages** | Days of keyword research and static page coding | Pre-renders 25 `/use-cases/*`, `/compare/*`, `/calculators/*`, `/guides/*`, `/templates/*`, `/alternatives/*`, and `/checklists/*` HTML landing pages |
|
|
49
|
+
| **85-Directory Launch Kit** | Hours of repetitive copy-pasting & UTM tagging | Synthesizes Show HN / Product Hunt / directory copy, generates 85 prefilled submission links, and pings IndexNow & WebSub |
|
|
50
|
+
| **Verification Inbox (`@postbuild.dev`)** | Clutters personal inbox with 85+ confirmation emails | Provisions isolated `<slug>-<hash>@postbuild.dev`, extracts 6-digit OTPs, and surfaces confirmation links |
|
|
51
|
+
| **Self-Serve Stripe Checkout Gate** | Custom billing boilerplate | Drop-in `<CheckoutGate />` component + `/api/checkout.js` server route template |
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Stateful MCP Server (`npx git-paid mcp`)
|
|
55
|
+
## Stateful MCP Server (`npx -y git-paid mcp`)
|
|
56
56
|
|
|
57
57
|
`git-paid` includes a built-in **Stateful Model Context Protocol (MCP) Server** over `stdio` (JSON-RPC 2.0) designed for **Claude Code**, **Cursor**, **Windsurf**, and **Google Antigravity / Gemini**.
|
|
58
58
|
|
|
59
59
|
Unlike stateless MCP servers that re-serialize identical directory lists and SEO payloads on every turn, the Postbuild MCP middleware provides:
|
|
60
60
|
|
|
61
61
|
1. **Watermark Context Residuals (`unchanged@vN` / `updated@vN`)**:
|
|
62
|
-
- Turn 1 projects clean entity stubs; Turn 2+ emits lightweight `@vN` watermark deltas for unchanged records,
|
|
62
|
+
- Turn 1 projects clean entity stubs; Turn 2+ emits lightweight `@vN` watermark deltas for unchanged records, reducing multi-turn token consumption in benchmarked multi-turn sessions.
|
|
63
63
|
2. **In-Memory Superset Query Cache (`<1ms` Latency)**:
|
|
64
64
|
- Follow-up filtered tool calls (`category`, `min_da`, `status`, `limit`) resolve in-memory in `<1ms` with zero redundant network round-trips.
|
|
65
65
|
3. **Two-Phase Cryptographic OCC Write Guard (`ct_...`)**:
|
|
66
66
|
- Live directory dispatch mutations require a Phase 1 dry-run (`dry_run: true`) that issues an HMAC-signed `commit_token` (`ct_...`) before Phase 2 commits the launch state.
|
|
67
67
|
4. **Untrusted Content Spotlighting**:
|
|
68
|
-
- External scraped metadata and inbound email
|
|
68
|
+
- External scraped metadata and all inbound email fields (`from`, `subject`, `snippet`, `primaryLink`, `otpCode`) are wrapped in `<<<UNTRUSTED_CONTENT_DATA_ONLY: ... >>>` delimiters to prevent indirect prompt injection.
|
|
69
69
|
|
|
70
70
|
### Available MCP Tools
|
|
71
71
|
|
|
@@ -73,11 +73,11 @@ Unlike stateless MCP servers that re-serialize identical directory lists and SEO
|
|
|
73
73
|
| :--- | :--- |
|
|
74
74
|
| `postbuild_scan` | Audits any live URL (8 technical/AI SEO & paywall checks), synthesizes launch copy, and caches working-set state. |
|
|
75
75
|
| `postbuild_directories` | Queries the 85-directory catalog using the in-memory superset cache and `@vN` watermark deltas. |
|
|
76
|
-
| `postbuild_pseo` | Queries and filters the 25
|
|
76
|
+
| `postbuild_pseo` | Queries and filters the 25 structured SEO routes with stateful delta compaction. |
|
|
77
77
|
| `postbuild_dispatch` | Executes Two-Phase Cryptographic OCC directory dispatch (`dry_run: true` → `commit_token` → commit). |
|
|
78
|
-
| `postbuild_inbox` | Polls `<slug
|
|
78
|
+
| `postbuild_inbox` | Polls `<slug>-<hash>@postbuild.dev`, extracts 6-digit OTPs, and optionally verifies allowlisted confirmation links. |
|
|
79
79
|
| `postbuild_fix` | Writes `robots.txt`, `sitemap.xml`, `llms.txt`, `.postbuild/pseo/*.html`, and `PostbuildCheckoutGate.jsx` to disk. |
|
|
80
|
-
| `postbuild_vault_sync` |
|
|
80
|
+
| `postbuild_vault_sync` | Writes `LAUNCH_STATUS.md` and `.postbuild/telemetry.json` to your project repo (or syncs into an Obsidian VaultOS dashboard if `.obsidian/` is present). |
|
|
81
81
|
|
|
82
82
|
### MCP Configuration (`mcp_config.json` / `.cursor/mcp.json` / `claude_desktop_config.json`)
|
|
83
83
|
|
|
@@ -94,20 +94,8 @@ Unlike stateless MCP servers that re-serialize identical directory lists and SEO
|
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
-
## Obsidian VaultOS Integration
|
|
98
|
-
|
|
99
|
-
Sync your live project launches directly into your **Obsidian VaultOS** command center:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
npx git-paid vault https://your-app.com --vault "C:/Users/You/ObsidianVault"
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Writes `_meta/postbuild-telemetry.json` and `_dashboards/Postbuild Launch.md` with live SEO readiness scores, 85-directory dispatch progress, `@postbuild.dev` OTP logs, and Buyer Intent Radar threads.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
97
|
## License
|
|
110
98
|
|
|
111
|
-
**Apache-2.0** — Copyright © 2026 Bennett Moore ([https://postbuild.dev](https://postbuild.dev)).
|
|
99
|
+
**Apache-2.0** — Copyright © 2026 Bennett Moore ([https://www.postbuild.dev](https://www.postbuild.dev)).
|
|
112
100
|
|
|
113
|
-
The `git-paid` CLI and MCP client are licensed under the [Apache License, Version 2.0](./LICENSE). Under Section 6 of the Apache-2.0 License, no permission is granted to use the `postbuild`, `git-paid`, or `postbuild.dev` trade names, trademarks, or logos. The hosted `postbuild.dev` cloud service, `@postbuild.dev` verification inbox infrastructure, and commercial Launch Pass / Studio tiers remain proprietary services of [https://postbuild.dev](https://postbuild.dev).
|
|
101
|
+
The `git-paid` CLI and MCP client are licensed under the [Apache License, Version 2.0](./LICENSE). Under Section 6 of the Apache-2.0 License, no permission is granted to use the `postbuild`, `git-paid`, or `postbuild.dev` trade names, trademarks, or logos. The hosted `postbuild.dev` cloud service, `@postbuild.dev` verification inbox infrastructure, and commercial Launch Pass / Studio tiers remain proprietary services of [https://www.postbuild.dev](https://www.postbuild.dev).
|
package/bin/git-paid.js
CHANGED
|
@@ -3,7 +3,7 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import { scanTargetUrl } from "../lib/engine.js";
|
|
6
|
-
import {
|
|
6
|
+
import { verifyCliLicense } from "../lib/auth.js";
|
|
7
7
|
import { applyLocalSeoFixes } from "../lib/fixer.js";
|
|
8
8
|
import { sendTestVerificationEmail } from "../lib/inbox.js";
|
|
9
9
|
import {
|
|
@@ -25,6 +25,14 @@ if (subcmd === "mcp" || args.includes("--mcp")) {
|
|
|
25
25
|
await runCli();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
function printProGateBanner(licenseCheck, featureName) {
|
|
29
|
+
console.log(` [LOCKED] ${featureName} requires an active postbuild Launch Pass ($29) or Studio ($49/mo) license.`);
|
|
30
|
+
console.log(` [UNLOCK] Instant Stripe Checkout ($29 Launch Pass):`);
|
|
31
|
+
console.log(` ${licenseCheck.checkoutUrl}\n`);
|
|
32
|
+
console.log(` [LOGIN] Already purchased? Authenticate your CLI & MCP server:`);
|
|
33
|
+
console.log(` npx git-paid login <your-pb_live_key>\n`);
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
async function runCli() {
|
|
29
37
|
console.log("\n========================================================");
|
|
30
38
|
console.log(" postbuild (postbuild.dev) — `git paid` CLI & MCP");
|
|
@@ -33,19 +41,81 @@ async function runCli() {
|
|
|
33
41
|
|
|
34
42
|
if (subcmd === "--help" || subcmd === "-h" || subcmd === "help") {
|
|
35
43
|
console.log(" Usage:");
|
|
36
|
-
console.log(" npx git-paid <url> Run 8-point SEO/paywall audit &
|
|
37
|
-
console.log(" git paid
|
|
38
|
-
console.log(" git paid fix [url]
|
|
39
|
-
console.log(" git paid
|
|
40
|
-
console.log(" git paid
|
|
44
|
+
console.log(" npx git-paid <url> Run free 8-point SEO/paywall audit & 5-directory preview");
|
|
45
|
+
console.log(" git paid login <pb_live_key> Authenticate CLI & MCP with your Launch Pass / Studio license");
|
|
46
|
+
console.log(" git paid fix [url] [PRO] Write 25 pSEO HTML pages, robots.txt, sitemap.xml & llms.txt");
|
|
47
|
+
console.log(" git paid submit [url] [PRO] Headless 85-directory form submitter + OTP auto-verifier");
|
|
48
|
+
console.log(" git paid inbox [bot-email] [PRO] Check & auto-verify <domain-tld>-bot@postbuild.dev (e.g. acme-com-bot@) links & OTPs");
|
|
49
|
+
console.log(" git paid mcp Start Postbuild MCP Server (postbuild-mcp v2.1.4)");
|
|
41
50
|
console.log(" git paid init-agent Scaffold .agent/skills/postbuild/SKILL.md & MCP config");
|
|
42
|
-
console.log(" git paid vault [path] Sync live telemetry & Bento
|
|
43
|
-
|
|
51
|
+
console.log(" git paid vault [path] [PRO] Sync live telemetry & Bento dashboard to Obsidian VaultOS\n");
|
|
52
|
+
process.exit(0);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (subcmd === "login") {
|
|
56
|
+
const input = (args[1] || "").trim();
|
|
57
|
+
if (!input) {
|
|
58
|
+
console.log(" Usage: npx git-paid login <pb_live_key | cs_live_session_id | email>\n");
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const payload = input.startsWith("pb_live_")
|
|
63
|
+
? { token: input }
|
|
64
|
+
: input.startsWith("cs_")
|
|
65
|
+
? { sessionId: input }
|
|
66
|
+
: { email: input };
|
|
67
|
+
|
|
68
|
+
let auth = null;
|
|
69
|
+
try {
|
|
70
|
+
const resp = await fetch("https://www.postbuild.dev/api/auth", {
|
|
71
|
+
method: "POST",
|
|
72
|
+
headers: { "Content-Type": "application/json" },
|
|
73
|
+
body: JSON.stringify(payload),
|
|
74
|
+
signal: AbortSignal.timeout(8000)
|
|
75
|
+
});
|
|
76
|
+
auth = await resp.json();
|
|
77
|
+
} catch (err) {
|
|
78
|
+
console.log(` [!] Could not reach https://www.postbuild.dev/api/auth: ${err.message}\n`);
|
|
79
|
+
process.exit(1);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (auth && auth.requiresOtp) {
|
|
83
|
+
console.log(` [*] ${auth.message}`);
|
|
84
|
+
console.log(` [*] Verify on https://www.postbuild.dev/?tab=account or use your pb_live_... key from the email.\n`);
|
|
85
|
+
process.exit(0);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (!auth || !auth.ok || !auth.token) {
|
|
89
|
+
console.log(` [!] Login failed: ${(auth && auth.error) || "Invalid license key."}\n`);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const globalDir = path.join(os.homedir(), ".postbuild");
|
|
94
|
+
fs.mkdirSync(globalDir, { recursive: true });
|
|
95
|
+
fs.writeFileSync(
|
|
96
|
+
path.join(globalDir, "credentials.json"),
|
|
97
|
+
JSON.stringify(
|
|
98
|
+
{ email: auth.email, plan: auth.plan, token: auth.token, updatedAt: new Date().toISOString() },
|
|
99
|
+
null,
|
|
100
|
+
2
|
|
101
|
+
),
|
|
102
|
+
"utf8"
|
|
103
|
+
);
|
|
104
|
+
console.log(` [+] Authenticated as: ${auth.email}`);
|
|
105
|
+
console.log(` [+] Active Plan: ${auth.plan}`);
|
|
106
|
+
console.log(` [+] License Key: ${auth.token.slice(0, 28)}...`);
|
|
107
|
+
console.log(` [ok] Saved credentials to ~/.postbuild/credentials.json\n`);
|
|
44
108
|
process.exit(0);
|
|
45
109
|
}
|
|
46
110
|
|
|
47
111
|
if (subcmd === "submit") {
|
|
48
112
|
const targetUrl = args.find((a, i) => i > 0 && !a.startsWith("--")) || "https://postbuild.dev";
|
|
113
|
+
const license = await verifyCliLicense({ domain: targetUrl.replace(/^https?:\/\//, "") });
|
|
114
|
+
if (!license.valid) {
|
|
115
|
+
printProGateBanner(license, "85-Directory Headless Submitter & @postbuild.dev Auto-Verifier");
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
|
|
49
119
|
console.log(` [*] Running Headless Directory Form Submitter for: ${targetUrl} ...`);
|
|
50
120
|
const submitRes = await runHeadlessDirectorySubmit({
|
|
51
121
|
targetUrl,
|
|
@@ -55,11 +125,11 @@ async function runCli() {
|
|
|
55
125
|
});
|
|
56
126
|
console.log(` [+] Headless Browser Engine: ${submitRes.headlessBrowser}`);
|
|
57
127
|
console.log(` [+] Provisioned Bot Inbox: ${submitRes.botEmail}`);
|
|
58
|
-
console.log(` [+] Total Directories
|
|
128
|
+
console.log(` [+] Total Directories Ready: ${submitRes.totalDirectoriesPrepared || submitRes.totalDirectoriesDispatched}\n`);
|
|
59
129
|
console.log(" --- Headless Form Inspection & Submission Receipts ---");
|
|
60
130
|
for (const r of submitRes.formReceipts) {
|
|
61
131
|
console.log(
|
|
62
|
-
` [
|
|
132
|
+
` [INSPECT] ${r.name.padEnd(23)} (DR ${r.dr}) via ${r.engineUsed} -> Fields: [${r.mappedFields.slice(0, 5).join(", ")}]`
|
|
63
133
|
);
|
|
64
134
|
}
|
|
65
135
|
console.log("\n --- @postbuild.dev Inbox Auto-Verification ---");
|
|
@@ -77,10 +147,10 @@ async function runCli() {
|
|
|
77
147
|
process.exit(0);
|
|
78
148
|
}
|
|
79
149
|
|
|
80
|
-
if (subcmd === "init-agent" || subcmd === "agent") {
|
|
150
|
+
if (subcmd === "init-agent" || subcmd === "agent" || subcmd === "skill") {
|
|
81
151
|
const res = installAgentSkillFiles({ cwd: process.cwd() });
|
|
82
152
|
console.log(` [+] Scaffolded Agent Skill: ${res.skillMdPath}`);
|
|
83
|
-
console.log(` [+] Powered by: postbuild-mcp@2.1.
|
|
153
|
+
console.log(` [+] Powered by: postbuild-mcp@2.1.4 (Stateful Delta Compaction)\n`);
|
|
84
154
|
console.log(" Add this to your Claude Code / Cursor / Antigravity MCP config:\n");
|
|
85
155
|
console.log(JSON.stringify(res.mcpConfigSnippet, null, 2));
|
|
86
156
|
console.log("");
|
|
@@ -88,15 +158,21 @@ async function runCli() {
|
|
|
88
158
|
}
|
|
89
159
|
|
|
90
160
|
if (subcmd === "vault" || subcmd === "vaultos") {
|
|
161
|
+
const license = await verifyCliLicense({ domain: "postbuild.dev" });
|
|
162
|
+
if (!license.valid) {
|
|
163
|
+
printProGateBanner(license, "Markdown / Docs & Telemetry Sync");
|
|
164
|
+
process.exit(1);
|
|
165
|
+
}
|
|
166
|
+
|
|
91
167
|
const vaultArg =
|
|
92
168
|
args.find((a, i) => i > 0 && !a.startsWith("--") && !/^https?:\/\//i.test(a)) ||
|
|
93
|
-
|
|
169
|
+
process.cwd();
|
|
94
170
|
const urlArgs = args.filter((a, i) => i > 0 && /^https?:\/\//i.test(a));
|
|
95
|
-
const targetUrls = urlArgs.length ? urlArgs : ["https://postbuild.dev"
|
|
171
|
+
const targetUrls = urlArgs.length ? urlArgs : ["https://postbuild.dev"];
|
|
96
172
|
|
|
97
|
-
console.log(` [*] Syncing Postbuild MCP Telemetry
|
|
98
|
-
console.log(` [*] Target
|
|
99
|
-
console.log(` [*] Domains:
|
|
173
|
+
console.log(` [*] Syncing Postbuild MCP Telemetry & Launch Status...`);
|
|
174
|
+
console.log(` [*] Target Directory: ${vaultArg}`);
|
|
175
|
+
console.log(` [*] Domains: ${targetUrls.join(", ")}\n`);
|
|
100
176
|
|
|
101
177
|
const syncRes = await syncPostbuildToVault({
|
|
102
178
|
vaultPath: vaultArg,
|
|
@@ -108,7 +184,7 @@ async function runCli() {
|
|
|
108
184
|
` [OK] ${p.domain.padEnd(20)} Score: ${p.readinessScore}/100 | pSEO: ${p.pseoCount} | Dirs: ${p.directoryCount} | MCP: ${p.mcpReductionPct}`
|
|
109
185
|
);
|
|
110
186
|
}
|
|
111
|
-
console.log("\n ---
|
|
187
|
+
console.log("\n --- Files Updated ---");
|
|
112
188
|
for (const f of syncRes.writtenVaultFiles) {
|
|
113
189
|
console.log(` [WRITE] ${f}`);
|
|
114
190
|
}
|
|
@@ -123,43 +199,18 @@ async function runCli() {
|
|
|
123
199
|
process.exit(0);
|
|
124
200
|
}
|
|
125
201
|
|
|
126
|
-
if (subcmd === "
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
const auth = await authenticateUser(
|
|
133
|
-
input.startsWith("pb_live_") ? { token: input } : { email: input }
|
|
134
|
-
);
|
|
135
|
-
if (!auth.ok) {
|
|
136
|
-
console.log(` [!] Login failed: ${auth.error}\n`);
|
|
202
|
+
if (subcmd === "inbox") {
|
|
203
|
+
const inboxAddr = args.find((a, i) => i > 0 && !a.startsWith("--")) || "postbuild-bot@postbuild.dev";
|
|
204
|
+
const license = await verifyCliLicense({ domain: "postbuild.dev" });
|
|
205
|
+
if (!license.valid) {
|
|
206
|
+
printProGateBanner(license, "Dedicated @postbuild.dev Verification Inbox & OTP Auto-Verifier");
|
|
137
207
|
process.exit(1);
|
|
138
208
|
}
|
|
139
|
-
const globalDir = path.join(os.homedir(), ".postbuild");
|
|
140
|
-
fs.mkdirSync(globalDir, { recursive: true });
|
|
141
|
-
fs.writeFileSync(
|
|
142
|
-
path.join(globalDir, "credentials.json"),
|
|
143
|
-
JSON.stringify(
|
|
144
|
-
{ email: auth.email, plan: auth.plan, token: auth.token, updatedAt: new Date().toISOString() },
|
|
145
|
-
null,
|
|
146
|
-
2
|
|
147
|
-
),
|
|
148
|
-
"utf8"
|
|
149
|
-
);
|
|
150
|
-
console.log(` [+] Authenticated as: ${auth.email}`);
|
|
151
|
-
console.log(` [+] Active Plan: ${auth.plan}`);
|
|
152
|
-
console.log(` [+] License Key: ${auth.token.slice(0, 28)}...`);
|
|
153
|
-
console.log(` [ok] Saved credentials to ~/.postbuild/credentials.json\n`);
|
|
154
|
-
process.exit(0);
|
|
155
|
-
}
|
|
156
209
|
|
|
157
|
-
if (subcmd === "inbox") {
|
|
158
|
-
const inboxAddr = args.find((a, i) => i > 0 && !a.startsWith("--")) || "postbuild-bot@postbuild.dev";
|
|
159
210
|
if (args.includes("--test")) {
|
|
160
211
|
await sendTestVerificationEmail(inboxAddr, "postbuild.dev");
|
|
161
212
|
}
|
|
162
|
-
const res = await autoVerifyInboxLinks(inboxAddr);
|
|
213
|
+
const res = await autoVerifyInboxLinks(inboxAddr, { autoVerify: !args.includes("--no-verify") });
|
|
163
214
|
console.log(
|
|
164
215
|
` [*] Verification Inbox: ${res.inboxAddress} (${res.totalMessages} messages, ${res.verifiedCount} auto-verified)\n`
|
|
165
216
|
);
|
|
@@ -185,24 +236,48 @@ async function runCli() {
|
|
|
185
236
|
console.log(` [*] Scanning Target: ${targetArg} ...`);
|
|
186
237
|
|
|
187
238
|
const report = await scanTargetUrl(targetArg);
|
|
239
|
+
const license = await verifyCliLicense({ domain: report.domain });
|
|
188
240
|
|
|
189
|
-
console.log(` [+] Provisioned Bot Inbox: ${report.botEmail}`);
|
|
241
|
+
console.log(` [+] Provisioned Bot Inbox: ${report.botEmail} ${license.valid ? "[ACTIVE]" : "[LOCKED — $29 Launch Pass]"}`);
|
|
190
242
|
console.log(` [+] Readiness Score: ${report.readinessScore} / 100`);
|
|
191
243
|
console.log(` [+] Auto-SEO Pages Ready: ${report.pseoPages.length} high-intent routes`);
|
|
192
244
|
console.log(` [+] Directory Launch Queue: ${report.directoryCount} AI, Dev & Startup Directories\n`);
|
|
193
245
|
|
|
194
|
-
console.log(" --- Audit
|
|
246
|
+
console.log(" --- 8-Point Technical & Monetization Audit ---");
|
|
195
247
|
for (const c of report.checks) {
|
|
196
248
|
const icon = c.passed ? "[PASS]" : "[WARN]";
|
|
197
249
|
console.log(` ${icon} ${c.label.padEnd(40)} -> ${c.detail}`);
|
|
198
250
|
}
|
|
199
251
|
|
|
252
|
+
if (isFixMode && !license.valid) {
|
|
253
|
+
console.log("");
|
|
254
|
+
printProGateBanner(license, "Auto-Fix Bundle (25 pSEO HTML Pages, llms.txt, sitemap.xml & 85-Directory CSV)");
|
|
255
|
+
process.exit(1);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (!license.valid) {
|
|
259
|
+
console.log("\n --- Directory Launch Queue Preview (First 5 of 85) ---");
|
|
260
|
+
for (const d of report.directories.slice(0, 5)) {
|
|
261
|
+
console.log(` [PREVIEW] ${d.name.padEnd(26)} (DR ${d.dr}) -> ${d.category}`);
|
|
262
|
+
}
|
|
263
|
+
console.log(` ... +80 additional high-DR directories locked.\n`);
|
|
264
|
+
|
|
265
|
+
console.log(" --- Programmatic SEO Route Preview (First 3 of 25) ---");
|
|
266
|
+
for (const p of report.pseoPages.slice(0, 3)) {
|
|
267
|
+
console.log(` [PREVIEW] ${p.path.padEnd(42)} (${p.volume}, ${p.kd})`);
|
|
268
|
+
}
|
|
269
|
+
console.log(` ... +22 additional Programmatic SEO HTML pages locked.\n`);
|
|
270
|
+
|
|
271
|
+
printProGateBanner(license, "Full 25-Page pSEO Generator, 85-Directory Dispatch & @postbuild.dev Inbox");
|
|
272
|
+
process.exit(0);
|
|
273
|
+
}
|
|
274
|
+
|
|
200
275
|
const fixResult = applyLocalSeoFixes(report, {
|
|
201
276
|
cwd: process.cwd(),
|
|
202
277
|
overwritePublic: isFixMode || args.includes("--force")
|
|
203
278
|
});
|
|
204
279
|
|
|
205
|
-
console.log(`\n --- Local Repository Auto-Fix (${fixResult.framework}) ---`);
|
|
280
|
+
console.log(`\n --- Local Repository Auto-Fix (${fixResult.framework} — Licensed to ${license.email}) ---`);
|
|
206
281
|
for (const f of fixResult.writtenFiles) {
|
|
207
282
|
console.log(` [WRITE] ${f.path.padEnd(36)} (${f.role})`);
|
|
208
283
|
}
|