seomd-cli 1.4.0 → 2.0.0
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/PROVIDER_SPEC.md +125 -0
- package/README.md +54 -190
- package/SKILL.md +44 -0
- package/bin/seomd.js +78 -31
- package/package.json +11 -7
- package/src/commands/analyze.js +90 -90
- package/src/commands/check.js +301 -0
- package/src/commands/doctor.js +109 -0
- package/src/commands/generate.js +202 -0
- package/src/commands/init.js +123 -62
- package/src/commands/status.js +92 -76
- package/src/commands/sync.js +84 -70
- package/src/commands/validate.js +52 -25
- package/src/generators/directory.js +43 -110
- package/src/generators/reverse.js +46 -56
- package/src/generators/seomd.js +197 -44
- package/src/providers/http.js +67 -0
- package/src/providers/index.js +194 -0
- package/src/utils/agent-wiring.js +97 -0
- package/src/utils/api-client.js +14 -56
- package/src/utils/constants.js +110 -12
- package/src/utils/parser.js +114 -25
- package/src/utils/repo-scanner.js +207 -0
- package/src/utils/writeback.js +171 -82
- package/src/validators/seomd.js +255 -93
- package/scripts/release-contributors.js +0 -196
- package/scripts/release-notes.js +0 -194
- package/src/templates/blog/SEO.REVERSE.md +0 -176
- package/src/templates/blog/SEO.md +0 -233
- package/src/templates/ecommerce/SEO.REVERSE.md +0 -199
- package/src/templates/ecommerce/SEO.md +0 -239
- package/src/templates/local/SEO.REVERSE.md +0 -222
- package/src/templates/local/SEO.md +0 -245
- package/src/templates/marketplace/SEO.REVERSE.md +0 -222
- package/src/templates/marketplace/SEO.md +0 -245
- package/src/templates/saas/SEO.REVERSE.md +0 -268
- package/src/templates/saas/SEO.md +0 -257
package/PROVIDER_SPEC.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# SEO.md Provider Protocol (v2.0.0)
|
|
2
|
+
|
|
3
|
+
`SEO.md` is a vendor-agnostic open standard. Local workflows (`init`, `validate`, `check`, `generate`, `doctor`) work offline with zero API keys.
|
|
4
|
+
|
|
5
|
+
Any SEO/AEO intelligence platform — **Foxcite** (reference implementation), **SEMrush**, **Ahrefs**, **Profound**, **Peec AI**, or a custom internal service — can plug into `seomd analyze` and `seomd sync` by exposing the HTTP contract below.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
Users select a provider in `SEO.md` frontmatter or via environment variables:
|
|
12
|
+
|
|
13
|
+
```yaml
|
|
14
|
+
provider:
|
|
15
|
+
name: custom # foxcite | semrush | ahrefs | profound | peec | custom
|
|
16
|
+
endpoint: https://api.your-provider.com
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Environment variables (override `SEO.md`):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
SEOMD_PROVIDER=custom
|
|
23
|
+
SEOMD_API_URL=https://api.your-provider.com
|
|
24
|
+
SEOMD_API_KEY=your_api_key
|
|
25
|
+
SEOMD_PAYMENT_TOKEN= # optional x402 pay-per-scan token
|
|
26
|
+
SEOMD_DOMAIN= # optional domain header override
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Authentication headers sent by `seomd-cli`:
|
|
30
|
+
- `Authorization: Bearer <SEOMD_API_KEY>` (when `SEOMD_API_KEY` is set)
|
|
31
|
+
- `x-payment-token: <SEOMD_PAYMENT_TOKEN>` (when `SEOMD_PAYMENT_TOKEN` is set)
|
|
32
|
+
- `x-seomd-domain: <SEOMD_DOMAIN>` (when `SEOMD_DOMAIN` is set)
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Endpoints
|
|
37
|
+
|
|
38
|
+
### 1. `POST /cli/analyze`
|
|
39
|
+
|
|
40
|
+
Runs a live AI citation & gap analysis and returns structured metrics + optional per-page playbooks.
|
|
41
|
+
|
|
42
|
+
**Request Body:**
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"domain": "acme.com",
|
|
46
|
+
"niche": "saas",
|
|
47
|
+
"brand": "Acme",
|
|
48
|
+
"queries": {
|
|
49
|
+
"category": ["best billing automation"],
|
|
50
|
+
"comparison": ["chargebee vs acme"]
|
|
51
|
+
},
|
|
52
|
+
"engines": ["ChatGPT", "Perplexity", "Claude"],
|
|
53
|
+
"pages": [
|
|
54
|
+
{
|
|
55
|
+
"id": "pricing",
|
|
56
|
+
"url": "/pricing",
|
|
57
|
+
"primary_keyword": "acme pricing",
|
|
58
|
+
"status": "live"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Response Body:**
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"provider": "your-provider",
|
|
68
|
+
"domain": "acme.com",
|
|
69
|
+
"brand_name": "Acme",
|
|
70
|
+
"credits_remaining": 42,
|
|
71
|
+
"aeo_analysis": {
|
|
72
|
+
"overall_citation_rate": 0.35,
|
|
73
|
+
"overall_gap_score": 48,
|
|
74
|
+
"engines_tracked": ["ChatGPT", "Perplexity", "Claude"],
|
|
75
|
+
"last_analyzed": "2026-11-22T00:00:00Z",
|
|
76
|
+
"next_analysis": "2026-11-29T00:00:00Z"
|
|
77
|
+
},
|
|
78
|
+
"intent_analysis": {
|
|
79
|
+
"category": {
|
|
80
|
+
"citation_rate": 0.2,
|
|
81
|
+
"gap_score": 65,
|
|
82
|
+
"top_cited_competitor": "chargebee.com",
|
|
83
|
+
"trend": "up"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"page_analysis": [
|
|
87
|
+
{
|
|
88
|
+
"id": "pricing",
|
|
89
|
+
"url": "/pricing",
|
|
90
|
+
"status": "live",
|
|
91
|
+
"citation_rate": 0.4,
|
|
92
|
+
"gap_score": 38,
|
|
93
|
+
"top_cited_competitor": "chargebee.com",
|
|
94
|
+
"why_page_won": ["Transparent tier comparison table"],
|
|
95
|
+
"citation_hooks": ["FAQPage JSON-LD with pricing Q&As"],
|
|
96
|
+
"gaps_for_brand": ["Missing enterprise SLA summary"],
|
|
97
|
+
"remediation_playbook": [],
|
|
98
|
+
"fastest_win": {
|
|
99
|
+
"action": "Add 50-word pricing summary above the fold",
|
|
100
|
+
"estimated_gap_score_improvement": 12,
|
|
101
|
+
"effort": "low"
|
|
102
|
+
},
|
|
103
|
+
"suggested_content_outline": [],
|
|
104
|
+
"markdown_content": "# pricing\n\n..."
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### 2. `POST /cli/sync` (or `GET /cli/sync`)
|
|
111
|
+
|
|
112
|
+
Returns the latest cached analysis payload in the exact same response shape as `POST /cli/analyze` without triggering a new paid scan.
|
|
113
|
+
|
|
114
|
+
- Standard v2 providers should accept `POST /cli/sync` with `{ "domain": "...", "pages": [...] }`.
|
|
115
|
+
- `seomd-cli` automatically falls back to `GET /cli/sync?domain=...&pages=...` for compatibility with providers that only implement `GET`.
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Error Codes
|
|
120
|
+
|
|
121
|
+
| Status | Meaning |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `401` | Invalid or missing `SEOMD_API_KEY` |
|
|
124
|
+
| `402` | Insufficient credits (supports `x402` payment retry via `SEOMD_PAYMENT_TOKEN`) |
|
|
125
|
+
| `4xx` / `5xx` | JSON body with `detail` or `message` string |
|
package/README.md
CHANGED
|
@@ -1,34 +1,25 @@
|
|
|
1
1
|
# SEO.md CLI
|
|
2
2
|
|
|
3
|
-
<p align="left" style="padding:
|
|
3
|
+
<p align="left" style="padding: 40px 0;">
|
|
4
4
|
<img alt="SEO.md CLI logo" src="./assets/logo.svg" />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
The official CLI for the [SEO.md](https://seomd.dev) open standard —
|
|
7
|
+
The official CLI for the [SEO.md](https://seomd.dev) open standard (spec **v2.0.0**) — the `AGENTS.md` / `CLAUDE.md` / `DESIGN.md` equivalent for search and AI Engine Optimization (AEO).
|
|
8
8
|
|
|
9
|
-
Use it to scaffold
|
|
9
|
+
Use it to scaffold a Markdown + YAML frontmatter `SEO.md`, wire coding agents automatically via `AGENTS.md` / `CLAUDE.md`, audit local pages offline, generate `robots.txt` / `llms.txt` / JSON-LD, and optionally connect any compatible AI citation intelligence provider.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
---
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
- [Install](#install)
|
|
15
|
-
- [Quick Start](#quick-start)
|
|
16
|
-
- [Configuration](#configuration)
|
|
17
|
-
- [Commands](#commands)
|
|
18
|
-
- [Local Development](#local-development)
|
|
19
|
-
- [Testing](#testing)
|
|
20
|
-
- [Release Notes (Contributor Tagging)](#release-notes-contributor-tagging)
|
|
21
|
-
- [Security](#security)
|
|
22
|
-
- [Specification Reference](#specification-reference)
|
|
23
|
-
- [License](#license)
|
|
13
|
+
## Why SEO.md?
|
|
24
14
|
|
|
25
|
-
|
|
15
|
+
Coding agents are great at shipping pages fast, but terrible at SEO/AEO without ground truth. `SEO.md` gives both humans and coding agents one repo-native source of truth:
|
|
26
16
|
|
|
27
|
-
|
|
17
|
+
- **Markdown-first (`---` frontmatter + prose):** Agents read Canonical Product Facts, Page & AEO Rules, Target Buyer Prompts, and Do Not Claim guardrails directly — while the CLI parses the structured frontmatter safely.
|
|
18
|
+
- **Zero-friction agent discovery:** `seomd init` automatically wires a concise pointer block into `AGENTS.md` / `CLAUDE.md` so coding agents pick up `SEO.md` on day one.
|
|
19
|
+
- **Useful offline with zero API keys:** `validate`, `check`, `generate`, and `doctor` all work locally.
|
|
20
|
+
- **Vendor-agnostic provider protocol:** Connect **Foxcite** (native reference implementation) or any provider/bridge implementing [`PROVIDER_SPEC.md`](./PROVIDER_SPEC.md) (SEMrush, Ahrefs, Profound, Peec AI, or custom).
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
- Run audits via your connected platform
|
|
31
|
-
- Write back `_analysis` blocks and per-page playbooks into your repo
|
|
22
|
+
---
|
|
32
23
|
|
|
33
24
|
## Install
|
|
34
25
|
|
|
@@ -36,216 +27,89 @@ SEO.md is a structured, version-controlled specification for describing your sit
|
|
|
36
27
|
npm install -g seomd-cli
|
|
37
28
|
```
|
|
38
29
|
|
|
39
|
-
Or run
|
|
30
|
+
Or run zero-install:
|
|
40
31
|
|
|
41
32
|
```bash
|
|
42
33
|
npx seomd-cli init
|
|
43
34
|
```
|
|
44
35
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
seomd --help
|
|
49
|
-
```
|
|
36
|
+
---
|
|
50
37
|
|
|
51
38
|
## Quick Start
|
|
52
39
|
|
|
53
|
-
### 1) Initialize
|
|
54
|
-
|
|
55
|
-
Run in the root of your project:
|
|
40
|
+
### 1) Initialize (Repo-Aware + Agent Wiring)
|
|
56
41
|
|
|
57
42
|
```bash
|
|
58
|
-
seomd init
|
|
43
|
+
npx seomd-cli init
|
|
59
44
|
```
|
|
60
45
|
|
|
61
|
-
|
|
46
|
+
`init` inspects your repo (Next.js, Astro, SvelteKit, etc.) to discover live routes, generates `SEO.md` (v2.0.0) and `.seo/`, and wires `AGENTS.md` / `CLAUDE.md` so coding agents read `SEO.md` automatically.
|
|
62
47
|
|
|
63
|
-
|
|
64
|
-
seomd init -y --type local
|
|
65
|
-
# or
|
|
66
|
-
seomd init --brand "Acme" --domain acme.com --primary-keyword "local seo"
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
### 2) Validate
|
|
48
|
+
Non-interactive mode:
|
|
70
49
|
|
|
71
50
|
```bash
|
|
72
|
-
seomd
|
|
51
|
+
npx seomd-cli init -y --type saas --brand "Acme" --domain acme.com --primary-keyword "billing automation"
|
|
73
52
|
```
|
|
74
53
|
|
|
75
|
-
###
|
|
54
|
+
### 2) Validate & Audit Locally (Zero API Key)
|
|
76
55
|
|
|
77
56
|
```bash
|
|
78
|
-
seomd
|
|
79
|
-
seomd
|
|
57
|
+
npx seomd-cli validate --strict
|
|
58
|
+
npx seomd-cli check ./out # audit static HTML output
|
|
59
|
+
npx seomd-cli check http://localhost:3000 # audit running dev server
|
|
60
|
+
npx seomd-cli doctor # check SEO.md, agent wiring, crawl files, provider
|
|
80
61
|
```
|
|
81
62
|
|
|
82
|
-
###
|
|
63
|
+
### 3) Generate Crawl & AI Discovery Artifacts
|
|
83
64
|
|
|
84
65
|
```bash
|
|
85
|
-
seomd
|
|
86
|
-
seomd
|
|
66
|
+
npx seomd-cli generate robots --out public/robots.txt
|
|
67
|
+
npx seomd-cli generate llms --out public/llms.txt
|
|
68
|
+
npx seomd-cli generate schema
|
|
87
69
|
```
|
|
88
70
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Copy `.env.example` from your platform provider docs, or create one with the vars you need:
|
|
71
|
+
### 4) Connect a Live Intelligence Provider (Optional)
|
|
92
72
|
|
|
93
|
-
|
|
73
|
+
Live citation scans (`analyze` / `sync`) write results into `.seo/STATUS.yml`, `.seo/REVERSE.md`, and `.seo/pages/*.md` (merge-safe on partial `--page` runs):
|
|
94
74
|
|
|
95
75
|
```bash
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
Optional:
|
|
76
|
+
# Example using Foxcite (native reference implementation)
|
|
77
|
+
export SEOMD_PROVIDER=foxcite
|
|
78
|
+
export SEOMD_API_KEY="your_api_key_here"
|
|
101
79
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
80
|
+
npx seomd-cli analyze
|
|
81
|
+
npx seomd-cli analyze --page /pricing --intent transactional
|
|
82
|
+
npx seomd-cli sync --dry-run
|
|
83
|
+
npx seomd-cli status --json
|
|
105
84
|
```
|
|
106
85
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
## Commands
|
|
110
|
-
|
|
111
|
-
### `seomd init`
|
|
112
|
-
|
|
113
|
-
Scaffolds `SEO.md`, `SEO.REVERSE.md`, and the `.seo/` intelligence directory.
|
|
114
|
-
|
|
115
|
-
**Usage:**
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
seomd init # interactive 5-question flow
|
|
119
|
-
seomd init -y --type local # skip prompts, use defaults
|
|
120
|
-
seomd init --brand "Acme" --domain acme.com # non-interactive with partial flags
|
|
121
|
-
seomd init --type saas --brand "MyApp" --domain myapp.com --primary-keyword "billing automation" --output ./new-project
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
**Options:**
|
|
125
|
-
|
|
126
|
-
| Flag | Description |
|
|
127
|
-
|------|-------------|
|
|
128
|
-
| `-y, --yes` | skip prompts, use defaults |
|
|
129
|
-
| `--type <type>` | site type: saas, ecommerce, local, blog, marketplace |
|
|
130
|
-
| `--brand <name>` | brand name |
|
|
131
|
-
| `--domain <domain>` | primary domain |
|
|
132
|
-
| `--primary-keyword <keyword>` | primary keyword |
|
|
133
|
-
| `--competitors <list>` | comma-separated competitor list |
|
|
134
|
-
| `--output <dir>` | scaffold into a new (empty) directory instead of cwd |
|
|
135
|
-
|
|
136
|
-
**Behavior:**
|
|
137
|
-
|
|
138
|
-
- Interactive flow by default (5 questions)
|
|
139
|
-
- Non-interactive when `-y` is set **OR** any config flag (`--brand`, `--domain`, `--primary-keyword`, `--competitors`) is provided
|
|
140
|
-
- `--type` alone pre-selects site type in the interactive flow
|
|
141
|
-
- `--output` writes all files to the target directory (must be empty or non-existent)
|
|
142
|
-
|
|
143
|
-
### `seomd validate`
|
|
144
|
-
|
|
145
|
-
Validates your `SEO.md` against the spec requirements.
|
|
146
|
-
|
|
147
|
-
### `seomd status`
|
|
148
|
-
|
|
149
|
-
Shows current citation rates and gap scores from `_analysis`.
|
|
150
|
-
|
|
151
|
-
- `--json` outputs machine-readable JSON for scripts/CI
|
|
152
|
-
|
|
153
|
-
### `seomd analyze`
|
|
154
|
-
|
|
155
|
-
Runs an AI search audit via your connected platform and writes results back into:
|
|
156
|
-
|
|
157
|
-
- `SEO.md` (`_analysis` blocks)
|
|
158
|
-
- `SEO.REVERSE.md` (generated reverse view)
|
|
159
|
-
- `.seo/pages/*.md` (per-page playbooks when available)
|
|
160
|
-
|
|
161
|
-
### `seomd sync`
|
|
162
|
-
|
|
163
|
-
Pulls cached/latest platform intelligence and writes it back to the same files as `analyze`.
|
|
164
|
-
|
|
165
|
-
- `--dry-run` prints a preview and does not modify files
|
|
86
|
+
See [`PROVIDER_SPEC.md`](./PROVIDER_SPEC.md) to connect custom endpoints or third-party platforms (`semrush`, `ahrefs`, `profound`, `peec`, `custom`).
|
|
166
87
|
|
|
167
|
-
|
|
88
|
+
---
|
|
168
89
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
| Type | Template dir | Best for |
|
|
172
|
-
|------|-------------|----------|
|
|
173
|
-
| `saas` | `src/templates/saas/` | Software products, B2B tools, web apps |
|
|
174
|
-
| `blog` | `src/templates/blog/` | Content sites, newsletters, personal brands |
|
|
175
|
-
| `ecommerce` | `src/templates/ecommerce/` | Online stores, DTC brands, product catalogs |
|
|
176
|
-
| `local` | `src/templates/local/` | Service-area businesses, locations pages |
|
|
177
|
-
| `marketplace` | `src/templates/marketplace/` | Two-sided platforms, directories |
|
|
178
|
-
|
|
179
|
-
Each template contains:
|
|
180
|
-
|
|
181
|
-
- `SEO.md` — pre-filled with type-specific intent queries, page structures, and negative keywords
|
|
182
|
-
- `SEO.REVERSE.md` — reverse-engineer output scaffold with placeholders for competitor analysis
|
|
183
|
-
|
|
184
|
-
Want to customize a template? Copy the relevant folder, edit the placeholders (`{{brand}}`, `{{domain}}`, etc.), and use `--type` with your custom scaffold.
|
|
185
|
-
|
|
186
|
-
## Local Development
|
|
90
|
+
## Commands
|
|
187
91
|
|
|
188
|
-
|
|
92
|
+
| Command | Offline? | Description |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| `seomd init` | Yes | Repo-aware scaffold for `SEO.md` (v2.0.0), `.seo/`, and `AGENTS.md` / `CLAUDE.md` wiring |
|
|
95
|
+
| `seomd validate` | Yes | Validate `SEO.md` (supports v2 frontmatter + legacy v1 YAML); `--strict`, `--json` |
|
|
96
|
+
| `seomd check [target]` | Yes | Audit local HTML/build dir or URL against `SEO.md` (title, meta, H1, canonical, JSON-LD, AI bots, negative terms) |
|
|
97
|
+
| `seomd generate <target>` | Yes | Generate `robots`, `llms`, or `schema` from `SEO.md` |
|
|
98
|
+
| `seomd doctor` | Yes | Inspect `SEO.md`, agent wiring, crawl files, and provider readiness |
|
|
99
|
+
| `seomd analyze` | Provider | Run live AI citation audit (`--page`, `--intent`, `--engines`) and merge into `.seo/` |
|
|
100
|
+
| `seomd sync` | Provider | Pull cached provider intelligence (`--dry-run` shows deltas) |
|
|
101
|
+
| `seomd status` | Yes | Display citation rates and gap scores from `.seo/STATUS.yml` (`--json`) |
|
|
189
102
|
|
|
190
|
-
|
|
191
|
-
node ./bin/seomd.js --help
|
|
192
|
-
node ./bin/seomd.js init
|
|
193
|
-
node ./bin/seomd.js validate
|
|
194
|
-
node ./bin/seomd.js status --json
|
|
195
|
-
```
|
|
103
|
+
---
|
|
196
104
|
|
|
197
|
-
## Testing
|
|
105
|
+
## Development & Testing
|
|
198
106
|
|
|
199
107
|
```bash
|
|
108
|
+
npm run lint
|
|
200
109
|
npm test
|
|
110
|
+
node ./bin/seomd.js --help
|
|
201
111
|
```
|
|
202
112
|
|
|
203
|
-
## Release Notes (Contributor Tagging)
|
|
204
|
-
|
|
205
|
-
To generate a contributor section for a release (commit-based attribution), maintain mappings in `.github/contributors.yml` and generate markdown from a tag range:
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
npm run release:contributors -- --from v1.0.2 --to v1.0.3
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
To write output to a file:
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
npm run release:contributors -- --from v1.0.2 --to v1.0.3 --out notes/v1.0.3-contributors.md
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
To generate a full release note (changes + contributors) for a tag:
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
npm run release:notes -- --tag v1.0.3
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
Automation: the repository includes a GitHub Actions workflow that runs on tag push (`v*`) and creates/updates the GitHub Release using `scripts/release-notes.js`.
|
|
224
|
-
|
|
225
|
-
## Platform Connections & API Keys
|
|
226
|
-
|
|
227
|
-
To enable live intelligence writebacks (using automated platforms like [Foxcite](https://foxcite.com)):
|
|
228
|
-
|
|
229
|
-
1. Obtain a developer API key from your platform provider.
|
|
230
|
-
2. Export the key as an environment variable:
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
export SEOMD_API_KEY="your_api_key_here"
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
3. Run `seomd sync` or `seomd analyze`.
|
|
237
|
-
|
|
238
|
-
_Note: Never commit your API keys or `.env` files containing keys to version control._
|
|
239
|
-
|
|
240
|
-
## Security
|
|
241
|
-
|
|
242
|
-
- Never commit `.env` files or API keys
|
|
243
|
-
- Use `.env.example` as the template for required variables
|
|
244
|
-
|
|
245
|
-
## Specification Reference
|
|
246
|
-
|
|
247
|
-
Read the complete specification and guidelines at [seomd.dev/spec](https://seomd.dev/spec).
|
|
248
|
-
|
|
249
113
|
## License
|
|
250
114
|
|
|
251
|
-
MIT License.
|
|
115
|
+
MIT License.
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# SEO.md CLI Skill
|
|
2
|
+
|
|
3
|
+
**What this does:** Scaffolds, validates, and audits `SEO.md` (spec v2.0.0) — the `AGENTS.md` / `CLAUDE.md` / `DESIGN.md` equivalent for search and AI-citation strategy — and wires coding-agent instructions directly into `AGENTS.md` / `CLAUDE.md`.
|
|
4
|
+
|
|
5
|
+
## Workflow for Coding Agents
|
|
6
|
+
|
|
7
|
+
1. **Initialize in a repo** (auto-detects routes and wires `AGENTS.md` / `CLAUDE.md`):
|
|
8
|
+
```bash
|
|
9
|
+
npx seomd-cli init
|
|
10
|
+
# or non-interactively:
|
|
11
|
+
npx seomd-cli init -y --type saas --brand "Acme" --domain acme.com --primary-keyword "billing automation"
|
|
12
|
+
```
|
|
13
|
+
2. **Read `SEO.md` before creating or editing public pages** — follow the Canonical Product Facts, Page & AEO Rules, Target Buyer Prompts, and Do Not Claim sections.
|
|
14
|
+
3. **Check page playbooks** in `.seo/pages/<page-id>.md` and `.seo/REVERSE.md` (when populated by a provider) to fix citation gaps.
|
|
15
|
+
4. **Verify locally (zero API key required):**
|
|
16
|
+
```bash
|
|
17
|
+
npx seomd-cli validate --strict
|
|
18
|
+
npx seomd-cli check ./out # or http://localhost:3000
|
|
19
|
+
npx seomd-cli generate robots --out public/robots.txt
|
|
20
|
+
npx seomd-cli generate llms --out public/llms.txt
|
|
21
|
+
npx seomd-cli doctor
|
|
22
|
+
```
|
|
23
|
+
5. **Run live AI citation scans (optional, any compatible provider):**
|
|
24
|
+
```bash
|
|
25
|
+
npx seomd-cli analyze # full audit -> updates .seo/
|
|
26
|
+
npx seomd-cli analyze --page /pricing # single page (merge-safe)
|
|
27
|
+
npx seomd-cli sync --dry-run # preview cached deltas
|
|
28
|
+
npx seomd-cli status --json # machine-readable metrics
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## `init` Flags
|
|
32
|
+
|
|
33
|
+
| Flag | Description |
|
|
34
|
+
|------|-------------|
|
|
35
|
+
| `-y, --yes` | skip prompts, use inferred defaults |
|
|
36
|
+
| `-f, --force` | overwrite existing `SEO.md` without prompting |
|
|
37
|
+
| `--type <type>` | `saas`, `ecommerce`, `local`, `blog`, `marketplace` |
|
|
38
|
+
| `--brand <name>` | brand name |
|
|
39
|
+
| `--domain <domain>` | primary domain |
|
|
40
|
+
| `--primary-keyword <keyword>` | primary keyword |
|
|
41
|
+
| `--competitors <list>` | comma-separated competitor domains |
|
|
42
|
+
| `--provider <name>` | optional provider (`foxcite`, `semrush`, `ahrefs`, `profound`, `peec`, `custom`) |
|
|
43
|
+
| `--no-wire-agents` | skip wiring `AGENTS.md` / `CLAUDE.md` |
|
|
44
|
+
| `--output <dir>` | scaffold into a new (empty) directory |
|
package/bin/seomd.js
CHANGED
|
@@ -10,83 +10,130 @@ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'))
|
|
|
10
10
|
|
|
11
11
|
// Commands
|
|
12
12
|
import { initCommand } from '../src/commands/init.js';
|
|
13
|
+
import { validateCommand } from '../src/commands/validate.js';
|
|
14
|
+
import { checkCommand } from '../src/commands/check.js';
|
|
15
|
+
import { generateCommand } from '../src/commands/generate.js';
|
|
16
|
+
import { doctorCommand } from '../src/commands/doctor.js';
|
|
13
17
|
import { analyzeCommand } from '../src/commands/analyze.js';
|
|
14
18
|
import { syncCommand } from '../src/commands/sync.js';
|
|
15
19
|
import { statusCommand } from '../src/commands/status.js';
|
|
16
|
-
import { validateCommand } from '../src/commands/validate.js';
|
|
17
20
|
|
|
18
21
|
program
|
|
19
22
|
.name('seomd')
|
|
20
|
-
.description('AEO infrastructure for technical founders
|
|
23
|
+
.description('Open-standard SEO.md CLI — AEO infrastructure for technical founders & coding agents (seomd.dev)')
|
|
21
24
|
.version(pkg.version);
|
|
22
25
|
|
|
23
26
|
program
|
|
24
27
|
.command('init')
|
|
25
|
-
.description('Scaffold SEO.md
|
|
26
|
-
.option('-y, --yes', 'skip prompts and use defaults')
|
|
28
|
+
.description('Scaffold SEO.md (v2.0.0), .seo/ workspace, and AGENTS.md/CLAUDE.md wiring')
|
|
29
|
+
.option('-y, --yes', 'skip prompts and use smart defaults')
|
|
30
|
+
.option('-f, --force', 'overwrite existing SEO.md without prompting')
|
|
27
31
|
.option('--type <type>', 'site type: saas, ecommerce, local, blog, marketplace')
|
|
28
32
|
.option('--brand <brand>', 'brand name')
|
|
29
33
|
.option('--domain <domain>', 'primary domain')
|
|
30
34
|
.option('--primary-keyword <keyword>', 'primary keyword')
|
|
31
35
|
.option('--competitors <list>', 'comma-separated competitor list')
|
|
36
|
+
.option('--provider <name>', 'optional provider: foxcite, semrush, ahrefs, profound, peec, custom')
|
|
37
|
+
.option('--no-wire-agents', 'skip wiring SEO.md instructions into AGENTS.md / CLAUDE.md')
|
|
32
38
|
.option('--output <dir>', 'scaffold into a new directory instead of cwd')
|
|
33
39
|
.addHelpText('after', `
|
|
34
40
|
|
|
35
41
|
Examples:
|
|
36
|
-
seomd init
|
|
37
|
-
seomd init -y --type
|
|
38
|
-
seomd init --brand "Acme" --domain acme.com --primary-keyword "
|
|
39
|
-
seomd init --type
|
|
42
|
+
seomd init # interactive flow with repo route detection
|
|
43
|
+
seomd init -y --type saas # skip prompts, auto-detect routes + wire AGENTS.md
|
|
44
|
+
seomd init --brand "Acme" --domain acme.com --primary-keyword "billing automation"
|
|
45
|
+
seomd init --type local --no-wire-agents --output ./new-project
|
|
40
46
|
`)
|
|
41
47
|
.action(initCommand);
|
|
42
48
|
|
|
49
|
+
program
|
|
50
|
+
.command('validate')
|
|
51
|
+
.description('Validate SEO.md against spec v2.0.0 (or legacy v1.0)')
|
|
52
|
+
.option('--strict', 'treat warnings as errors (useful in CI)')
|
|
53
|
+
.option('--json', 'output machine-readable JSON')
|
|
54
|
+
.addHelpText('after', `
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
seomd validate
|
|
58
|
+
seomd validate --strict --json
|
|
59
|
+
`)
|
|
60
|
+
.action(validateCommand);
|
|
61
|
+
|
|
62
|
+
program
|
|
63
|
+
.command('check [target]')
|
|
64
|
+
.description('Audit local HTML/build output or a URL against SEO.md (offline, zero API key)')
|
|
65
|
+
.option('--strict', 'treat warnings as errors')
|
|
66
|
+
.option('--json', 'output machine-readable JSON')
|
|
67
|
+
.addHelpText('after', `
|
|
68
|
+
|
|
69
|
+
Examples:
|
|
70
|
+
seomd check ./out # audit static build output
|
|
71
|
+
seomd check http://localhost:3000 # audit running dev server
|
|
72
|
+
seomd check ./public --json # machine-readable check for CI / agents
|
|
73
|
+
`)
|
|
74
|
+
.action(checkCommand);
|
|
75
|
+
|
|
76
|
+
program
|
|
77
|
+
.command('generate <target>')
|
|
78
|
+
.description('Generate robots.txt, llms.txt, or JSON-LD schema from SEO.md (offline)')
|
|
79
|
+
.option('--out <file>', 'write output to file instead of stdout')
|
|
80
|
+
.addHelpText('after', `
|
|
81
|
+
|
|
82
|
+
Targets:
|
|
83
|
+
robots AI-crawler-friendly robots.txt
|
|
84
|
+
llms llms.txt directory for AI agents
|
|
85
|
+
schema JSON-LD starter graph
|
|
86
|
+
|
|
87
|
+
Examples:
|
|
88
|
+
seomd generate robots --out public/robots.txt
|
|
89
|
+
seomd generate llms --out public/llms.txt
|
|
90
|
+
seomd generate schema
|
|
91
|
+
`)
|
|
92
|
+
.action(generateCommand);
|
|
93
|
+
|
|
94
|
+
program
|
|
95
|
+
.command('doctor')
|
|
96
|
+
.description('Check SEO.md validity, agent wiring, crawl files, and provider readiness')
|
|
97
|
+
.option('--json', 'output as JSON')
|
|
98
|
+
.action(doctorCommand);
|
|
99
|
+
|
|
43
100
|
program
|
|
44
101
|
.command('analyze')
|
|
45
|
-
.description('Run citation analysis
|
|
46
|
-
.option('--page <url>', 'analyze a specific page only')
|
|
102
|
+
.description('Run live AI citation analysis via your configured provider and update .seo/')
|
|
103
|
+
.option('--page <url>', 'analyze a specific page only (merges into .seo/)')
|
|
47
104
|
.option('--intent <category>', 'analyze a specific intent category only')
|
|
48
|
-
.option('--engines <list>', 'comma-separated list of engines to scan (e.g.
|
|
105
|
+
.option('--engines <list>', 'comma-separated list of engines to scan (e.g. ChatGPT,Claude)')
|
|
49
106
|
.addHelpText('after', `
|
|
50
107
|
|
|
51
108
|
Examples:
|
|
52
|
-
seomd analyze
|
|
53
|
-
seomd analyze --page /pricing
|
|
54
|
-
seomd analyze --intent transactional --engines
|
|
109
|
+
seomd analyze # full audit
|
|
110
|
+
seomd analyze --page /pricing # single page audit (merge-safe)
|
|
111
|
+
seomd analyze --intent transactional --engines ChatGPT,Claude
|
|
55
112
|
`)
|
|
56
113
|
.action(analyzeCommand);
|
|
57
114
|
|
|
58
115
|
program
|
|
59
116
|
.command('sync')
|
|
60
|
-
.description('
|
|
61
|
-
.option('--dry-run', 'preview
|
|
117
|
+
.description('Pull latest cached intelligence from your configured provider into .seo/')
|
|
118
|
+
.option('--dry-run', 'preview metric deltas without modifying files')
|
|
62
119
|
.addHelpText('after', `
|
|
63
120
|
|
|
64
121
|
Examples:
|
|
65
|
-
seomd sync
|
|
66
|
-
seomd sync --dry-run
|
|
122
|
+
seomd sync
|
|
123
|
+
seomd sync --dry-run
|
|
67
124
|
`)
|
|
68
125
|
.action(syncCommand);
|
|
69
126
|
|
|
70
127
|
program
|
|
71
128
|
.command('status')
|
|
72
|
-
.description('Show current citation rates and gap scores')
|
|
129
|
+
.description('Show current citation rates and gap scores from .seo/STATUS.yml')
|
|
73
130
|
.option('--json', 'output as JSON')
|
|
74
131
|
.addHelpText('after', `
|
|
75
132
|
|
|
76
133
|
Examples:
|
|
77
|
-
seomd status
|
|
78
|
-
seomd status --json
|
|
134
|
+
seomd status
|
|
135
|
+
seomd status --json
|
|
79
136
|
`)
|
|
80
137
|
.action(statusCommand);
|
|
81
138
|
|
|
82
|
-
program
|
|
83
|
-
.command('validate')
|
|
84
|
-
.description('Validate your SEO.md against the spec')
|
|
85
|
-
.addHelpText('after', `
|
|
86
|
-
|
|
87
|
-
Example:
|
|
88
|
-
seomd validate
|
|
89
|
-
`)
|
|
90
|
-
.action(validateCommand);
|
|
91
|
-
|
|
92
139
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seomd-cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The official CLI for the SEO.md open standard — AEO infrastructure for technical founders",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "The official CLI for the SEO.md open standard — AEO infrastructure for technical founders and coding agents",
|
|
5
5
|
"homepage": "https://seomd.dev",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"bin",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"src",
|
|
18
|
+
"PROVIDER_SPEC.md",
|
|
19
|
+
"SKILL.md"
|
|
19
20
|
],
|
|
20
21
|
"scripts": {
|
|
21
22
|
"dev": "node bin/seomd.js",
|
|
22
23
|
"test": "node --experimental-vm-modules node_modules/.bin/jest",
|
|
23
|
-
"lint": "eslint src/**/*.js",
|
|
24
|
+
"lint": "eslint bin/**/*.js src/**/*.js scripts/**/*.js tests/**/*.js",
|
|
24
25
|
"release:contributors": "node scripts/release-contributors.js",
|
|
25
26
|
"release:notes": "node scripts/release-notes.js"
|
|
26
27
|
},
|
|
@@ -47,8 +48,11 @@
|
|
|
47
48
|
"aeo",
|
|
48
49
|
"geo",
|
|
49
50
|
"seomd",
|
|
51
|
+
"agents-md",
|
|
52
|
+
"claude-md",
|
|
50
53
|
"ai-search",
|
|
51
54
|
"citation-tracking",
|
|
52
|
-
"llm-seo"
|
|
55
|
+
"llm-seo",
|
|
56
|
+
"llms-txt"
|
|
53
57
|
]
|
|
54
|
-
}
|
|
58
|
+
}
|