seo-pilot 0.1.0__tar.gz
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.
- seo_pilot-0.1.0/.gitignore +29 -0
- seo_pilot-0.1.0/Dockerfile +11 -0
- seo_pilot-0.1.0/LICENSE +21 -0
- seo_pilot-0.1.0/PKG-INFO +270 -0
- seo_pilot-0.1.0/README.md +238 -0
- seo_pilot-0.1.0/config.example.yaml +59 -0
- seo_pilot-0.1.0/core/__init__.py +0 -0
- seo_pilot-0.1.0/docker-compose.yaml +11 -0
- seo_pilot-0.1.0/guidelines/default.md +117 -0
- seo_pilot-0.1.0/integrations/__init__.py +0 -0
- seo_pilot-0.1.0/pyproject.toml +51 -0
- seo_pilot-0.1.0/seo_pilot/__init__.py +3 -0
- seo_pilot-0.1.0/seo_pilot/analyzer.py +378 -0
- seo_pilot-0.1.0/seo_pilot/changelog.py +203 -0
- seo_pilot-0.1.0/seo_pilot/cli.py +783 -0
- seo_pilot-0.1.0/seo_pilot/config.py +184 -0
- seo_pilot-0.1.0/seo_pilot/gsc_client.py +168 -0
- seo_pilot-0.1.0/seo_pilot/linking_audit.py +321 -0
- seo_pilot-0.1.0/seo_pilot/llm.py +287 -0
- seo_pilot-0.1.0/seo_pilot/notifier.py +211 -0
- seo_pilot-0.1.0/seo_pilot/reporter.py +243 -0
- seo_pilot-0.1.0/seo_pilot/storage.py +225 -0
- seo_pilot-0.1.0/templates/monthly_report.j2 +112 -0
- seo_pilot-0.1.0/templates/weekly_report.j2 +73 -0
- seo_pilot-0.1.0/tests/__init__.py +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
|
|
9
|
+
# Config and secrets
|
|
10
|
+
config.yaml
|
|
11
|
+
credentials.json
|
|
12
|
+
*.db
|
|
13
|
+
.env
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
*.swp
|
|
19
|
+
|
|
20
|
+
# OS
|
|
21
|
+
.DS_Store
|
|
22
|
+
Thumbs.db
|
|
23
|
+
|
|
24
|
+
# Data
|
|
25
|
+
data/
|
|
26
|
+
*.json
|
|
27
|
+
!config.example.yaml
|
|
28
|
+
!guidelines/*.md
|
|
29
|
+
!templates/*.j2
|
seo_pilot-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Palicz91
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
seo_pilot-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: seo-pilot
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Self-improving SEO agent. Measures, acts, learns.
|
|
5
|
+
Author: Palicz91
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: agent,automation,google-search-console,self-improving,seo
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Requires-Dist: beautifulsoup4>=4.12
|
|
20
|
+
Requires-Dist: google-api-python-client>=2.0
|
|
21
|
+
Requires-Dist: google-auth>=2.0
|
|
22
|
+
Requires-Dist: httpx>=0.27.0
|
|
23
|
+
Requires-Dist: jinja2>=3.1
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Requires-Dist: sqlmodel>=0.0.14
|
|
27
|
+
Requires-Dist: typer>=0.9.0
|
|
28
|
+
Provides-Extra: dev
|
|
29
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
30
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
31
|
+
Description-Content-Type: text/markdown
|
|
32
|
+
|
|
33
|
+
# seo-pilot
|
|
34
|
+
|
|
35
|
+
Self-improving SEO agent. Measures, acts, learns.
|
|
36
|
+
|
|
37
|
+
seo-pilot syncs your Google Search Console data, identifies what needs fixing, suggests concrete changes, and measures whether they worked. It's the closed feedback loop most SEO workflows are missing.
|
|
38
|
+
|
|
39
|
+
## What it does
|
|
40
|
+
|
|
41
|
+
1. **Syncs** GSC data daily (queries, pages, impressions, clicks, position)
|
|
42
|
+
2. **Analyzes** on a weekly and monthly schedule:
|
|
43
|
+
- **Low hanging fruit**: pages with high impressions but low CTR for their position
|
|
44
|
+
- **Content gaps**: queries where Google shows your site but you have no dedicated page
|
|
45
|
+
- **Rising queries**: search terms growing >30% week-over-week
|
|
46
|
+
- **Position drops**: pages losing ground (>2 positions)
|
|
47
|
+
3. **Suggests** concrete title/meta rewrites via LLM (Claude, OpenAI, Gemini, or Ollama)
|
|
48
|
+
4. **Tracks** every action in a queue with priority scoring
|
|
49
|
+
5. **Measures** the impact of your changes automatically and writes changelog entries
|
|
50
|
+
6. **Audits** internal links: finds orphan pages, broken links, missing product links
|
|
51
|
+
|
|
52
|
+
## What makes it different
|
|
53
|
+
|
|
54
|
+
Most SEO tools tell you what happened. seo-pilot tells you what to **do** and then checks if it **worked**.
|
|
55
|
+
|
|
56
|
+
- **Closed feedback loop**: change title → measure CTR after 14d → auto-log result
|
|
57
|
+
- **Action queue**: every finding becomes a trackable action with priority
|
|
58
|
+
- **Auto-changelog**: records before/after for every change with baseline metrics
|
|
59
|
+
- **Scoring engine**: prioritizes pages by impression volume, position, and CTR gap
|
|
60
|
+
- **Expert guidelines**: built-in 2026 SEO best practices (customizable)
|
|
61
|
+
|
|
62
|
+
## Quick start
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Install
|
|
66
|
+
pip install seo-pilot
|
|
67
|
+
|
|
68
|
+
# Interactive setup
|
|
69
|
+
seo-pilot init
|
|
70
|
+
|
|
71
|
+
# Check everything works
|
|
72
|
+
seo-pilot doctor
|
|
73
|
+
|
|
74
|
+
# Sync last 90 days of GSC data
|
|
75
|
+
seo-pilot sync --backfill
|
|
76
|
+
|
|
77
|
+
# Run your first review
|
|
78
|
+
seo-pilot review
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Requirements
|
|
82
|
+
|
|
83
|
+
- Python 3.10+
|
|
84
|
+
- Google Search Console access (service account)
|
|
85
|
+
- Optional: LLM API key (for title suggestions)
|
|
86
|
+
- Optional: Telegram/Slack (for notifications)
|
|
87
|
+
|
|
88
|
+
## Setup
|
|
89
|
+
|
|
90
|
+
### 1. Google Search Console credentials
|
|
91
|
+
|
|
92
|
+
Create a Google Cloud service account with Search Console API access:
|
|
93
|
+
|
|
94
|
+
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
|
|
95
|
+
2. Create a project (or use existing)
|
|
96
|
+
3. Enable "Google Search Console API"
|
|
97
|
+
4. Create a service account → download JSON key
|
|
98
|
+
5. Add the service account email as a user in your GSC property
|
|
99
|
+
|
|
100
|
+
Save the JSON key as `credentials.json` in your project root.
|
|
101
|
+
|
|
102
|
+
### 2. Configuration
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
seo-pilot init
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
This creates `config.yaml` with your settings. Or copy `config.example.yaml` and edit manually.
|
|
109
|
+
|
|
110
|
+
### 3. First sync
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Backfill 90 days of historical data
|
|
114
|
+
seo-pilot sync --backfill
|
|
115
|
+
|
|
116
|
+
# Run first analysis
|
|
117
|
+
seo-pilot review
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Commands
|
|
121
|
+
|
|
122
|
+
| Command | What it does |
|
|
123
|
+
|---------|-------------|
|
|
124
|
+
| `seo-pilot init` | Interactive setup, generates config.yaml |
|
|
125
|
+
| `seo-pilot doctor` | Checks config, GSC auth, DB, notifications |
|
|
126
|
+
| `seo-pilot sync` | Sync yesterday's GSC data |
|
|
127
|
+
| `seo-pilot sync --backfill` | Load last 90 days |
|
|
128
|
+
| `seo-pilot review` | Weekly review (28d vs prev 28d) |
|
|
129
|
+
| `seo-pilot review --monthly` | Monthly review (90d trend) |
|
|
130
|
+
| `seo-pilot audit links` | Internal linking audit via HTTP crawl |
|
|
131
|
+
| `seo-pilot actions list` | Show open actions |
|
|
132
|
+
| `seo-pilot actions resolve <id>` | Mark action as resolved |
|
|
133
|
+
|
|
134
|
+
## Review schedule
|
|
135
|
+
|
|
136
|
+
| Frequency | Window | What it covers |
|
|
137
|
+
|-----------|--------|---------------|
|
|
138
|
+
| Weekly | 28 days vs previous 28 days | LHF, content gaps, rising queries, drops, title suggestions |
|
|
139
|
+
| Monthly (1st week) | 90 days, month-by-month | Trend analysis, position movers, action queue summary, stale action escalation |
|
|
140
|
+
|
|
141
|
+
## How scoring works
|
|
142
|
+
|
|
143
|
+
Every low-hanging-fruit page gets a composite score (0-100):
|
|
144
|
+
|
|
145
|
+
| Factor | Weight | Example |
|
|
146
|
+
|--------|--------|---------|
|
|
147
|
+
| Impression volume | 30% | 200 imp = 30/30 |
|
|
148
|
+
| Position (5-15 sweet spot) | 25% | pos 8 = 25/25 |
|
|
149
|
+
| CTR gap vs expected | 25% | pos 3 + 0% CTR (expected 11%) = 25/25 |
|
|
150
|
+
| Title quality | 10% | question format + year = 10/10 |
|
|
151
|
+
| Content freshness | 10% | current year = 10/10 |
|
|
152
|
+
|
|
153
|
+
Score 85+ = urgent (fix today). Score 70+ = action this week.
|
|
154
|
+
|
|
155
|
+
Expected CTR benchmarks (2026):
|
|
156
|
+
- Position 1: 28%, Position 3: 11%, Position 5: 7%, Position 10: 3%
|
|
157
|
+
|
|
158
|
+
## LLM providers
|
|
159
|
+
|
|
160
|
+
seo-pilot uses an LLM to generate title/meta suggestions. Supported providers:
|
|
161
|
+
|
|
162
|
+
| Provider | Config value | Model examples |
|
|
163
|
+
|----------|-------------|----------------|
|
|
164
|
+
| Google Gemini | `gemini` | gemini-2.0-flash |
|
|
165
|
+
| Anthropic Claude | `claude` | claude-sonnet-4-6 |
|
|
166
|
+
| OpenAI | `openai` | gpt-4o |
|
|
167
|
+
| Ollama (local) | `ollama` | llama3, mistral |
|
|
168
|
+
|
|
169
|
+
Title suggestions are optional. The analysis runs without an LLM.
|
|
170
|
+
|
|
171
|
+
## Internal linking audit
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
seo-pilot audit links
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Crawls your site via HTTP (no headless browser needed), maps all internal links, and identifies:
|
|
178
|
+
- **Orphan pages**: pages with zero inbound internal links
|
|
179
|
+
- **Broken links**: internal links pointing to 404s
|
|
180
|
+
- **Missing product links**: blog posts without a link to pricing/conversion pages
|
|
181
|
+
- **Cluster mapping**: groups pages into topic clusters
|
|
182
|
+
|
|
183
|
+
Output: `linking-map.md` in your project root.
|
|
184
|
+
|
|
185
|
+
## Docker
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Build
|
|
189
|
+
docker build -t seo-pilot .
|
|
190
|
+
|
|
191
|
+
# Run a review
|
|
192
|
+
docker run -v ./config.yaml:/app/config.yaml \
|
|
193
|
+
-v ./credentials.json:/app/credentials.json \
|
|
194
|
+
-e TELEGRAM_BOT_TOKEN=xxx \
|
|
195
|
+
-e GEMINI_API_KEY=xxx \
|
|
196
|
+
seo-pilot review
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Or with docker-compose:
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
docker-compose run seo-pilot review
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Guidelines
|
|
206
|
+
|
|
207
|
+
seo-pilot includes default SEO guidelines at `guidelines/default.md`. These encode 2026 best practices for title tags, meta descriptions, content scoring, and internal linking.
|
|
208
|
+
|
|
209
|
+
Customize by editing the file or pointing to your own:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
guidelines:
|
|
213
|
+
path: "./my-guidelines.md"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Guidelines should be refreshed quarterly. The scoring engine reads thresholds from the guidelines.
|
|
217
|
+
|
|
218
|
+
## File structure
|
|
219
|
+
|
|
220
|
+
```
|
|
221
|
+
seo-pilot/
|
|
222
|
+
├── config.yaml # Your config (gitignored)
|
|
223
|
+
├── config.example.yaml # Template
|
|
224
|
+
├── credentials.json # GSC service account (gitignored)
|
|
225
|
+
├── seo-pilot.db # SQLite database (gitignored)
|
|
226
|
+
├── guidelines/
|
|
227
|
+
│ └── default.md # SEO best practices
|
|
228
|
+
├── templates/
|
|
229
|
+
│ ├── weekly_report.j2 # Weekly report template
|
|
230
|
+
│ └── monthly_report.j2 # Monthly report template
|
|
231
|
+
├── seo_pilot/
|
|
232
|
+
│ ├── cli.py # CLI commands
|
|
233
|
+
│ ├── config.py # Config loader
|
|
234
|
+
│ ├── gsc_client.py # Google Search Console API
|
|
235
|
+
│ ├── storage.py # SQLite/Postgres storage
|
|
236
|
+
│ ├── analyzer.py # Analysis engine
|
|
237
|
+
│ ├── changelog.py # Auto-changelog
|
|
238
|
+
│ ├── linking_audit.py # Internal link crawler
|
|
239
|
+
│ ├── notifier.py # Telegram/Slack/webhook
|
|
240
|
+
│ ├── llm.py # LLM title suggestions
|
|
241
|
+
│ └── reporter.py # Report generator
|
|
242
|
+
└── docs/
|
|
243
|
+
└── architecture.md # System design
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
## Roadmap
|
|
247
|
+
|
|
248
|
+
- [x] v0.1 — Core: GSC sync, analysis, action queue, changelog, CLI
|
|
249
|
+
- [ ] v0.2 — MCP server mode (use from Claude Code directly)
|
|
250
|
+
- [ ] v0.2 — Web dashboard (lightweight, static HTML)
|
|
251
|
+
- [ ] v0.2 — OAuth support (not just service account)
|
|
252
|
+
- [ ] v0.2 — Slack + Discord notifications
|
|
253
|
+
- [ ] v0.3 — Competitor watch plugin
|
|
254
|
+
- [ ] v0.3 — WordPress/CMS content discovery
|
|
255
|
+
|
|
256
|
+
## Contributing
|
|
257
|
+
|
|
258
|
+
Contributions welcome. Please open an issue first to discuss what you'd like to change.
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
# Development setup
|
|
262
|
+
git clone https://github.com/Palicz91/seo-pilot.git
|
|
263
|
+
cd seo-pilot
|
|
264
|
+
pip install -e ".[dev]"
|
|
265
|
+
pytest
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## License
|
|
269
|
+
|
|
270
|
+
MIT
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
# seo-pilot
|
|
2
|
+
|
|
3
|
+
Self-improving SEO agent. Measures, acts, learns.
|
|
4
|
+
|
|
5
|
+
seo-pilot syncs your Google Search Console data, identifies what needs fixing, suggests concrete changes, and measures whether they worked. It's the closed feedback loop most SEO workflows are missing.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
1. **Syncs** GSC data daily (queries, pages, impressions, clicks, position)
|
|
10
|
+
2. **Analyzes** on a weekly and monthly schedule:
|
|
11
|
+
- **Low hanging fruit**: pages with high impressions but low CTR for their position
|
|
12
|
+
- **Content gaps**: queries where Google shows your site but you have no dedicated page
|
|
13
|
+
- **Rising queries**: search terms growing >30% week-over-week
|
|
14
|
+
- **Position drops**: pages losing ground (>2 positions)
|
|
15
|
+
3. **Suggests** concrete title/meta rewrites via LLM (Claude, OpenAI, Gemini, or Ollama)
|
|
16
|
+
4. **Tracks** every action in a queue with priority scoring
|
|
17
|
+
5. **Measures** the impact of your changes automatically and writes changelog entries
|
|
18
|
+
6. **Audits** internal links: finds orphan pages, broken links, missing product links
|
|
19
|
+
|
|
20
|
+
## What makes it different
|
|
21
|
+
|
|
22
|
+
Most SEO tools tell you what happened. seo-pilot tells you what to **do** and then checks if it **worked**.
|
|
23
|
+
|
|
24
|
+
- **Closed feedback loop**: change title → measure CTR after 14d → auto-log result
|
|
25
|
+
- **Action queue**: every finding becomes a trackable action with priority
|
|
26
|
+
- **Auto-changelog**: records before/after for every change with baseline metrics
|
|
27
|
+
- **Scoring engine**: prioritizes pages by impression volume, position, and CTR gap
|
|
28
|
+
- **Expert guidelines**: built-in 2026 SEO best practices (customizable)
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Install
|
|
34
|
+
pip install seo-pilot
|
|
35
|
+
|
|
36
|
+
# Interactive setup
|
|
37
|
+
seo-pilot init
|
|
38
|
+
|
|
39
|
+
# Check everything works
|
|
40
|
+
seo-pilot doctor
|
|
41
|
+
|
|
42
|
+
# Sync last 90 days of GSC data
|
|
43
|
+
seo-pilot sync --backfill
|
|
44
|
+
|
|
45
|
+
# Run your first review
|
|
46
|
+
seo-pilot review
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Requirements
|
|
50
|
+
|
|
51
|
+
- Python 3.10+
|
|
52
|
+
- Google Search Console access (service account)
|
|
53
|
+
- Optional: LLM API key (for title suggestions)
|
|
54
|
+
- Optional: Telegram/Slack (for notifications)
|
|
55
|
+
|
|
56
|
+
## Setup
|
|
57
|
+
|
|
58
|
+
### 1. Google Search Console credentials
|
|
59
|
+
|
|
60
|
+
Create a Google Cloud service account with Search Console API access:
|
|
61
|
+
|
|
62
|
+
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
|
|
63
|
+
2. Create a project (or use existing)
|
|
64
|
+
3. Enable "Google Search Console API"
|
|
65
|
+
4. Create a service account → download JSON key
|
|
66
|
+
5. Add the service account email as a user in your GSC property
|
|
67
|
+
|
|
68
|
+
Save the JSON key as `credentials.json` in your project root.
|
|
69
|
+
|
|
70
|
+
### 2. Configuration
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
seo-pilot init
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
This creates `config.yaml` with your settings. Or copy `config.example.yaml` and edit manually.
|
|
77
|
+
|
|
78
|
+
### 3. First sync
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Backfill 90 days of historical data
|
|
82
|
+
seo-pilot sync --backfill
|
|
83
|
+
|
|
84
|
+
# Run first analysis
|
|
85
|
+
seo-pilot review
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Commands
|
|
89
|
+
|
|
90
|
+
| Command | What it does |
|
|
91
|
+
|---------|-------------|
|
|
92
|
+
| `seo-pilot init` | Interactive setup, generates config.yaml |
|
|
93
|
+
| `seo-pilot doctor` | Checks config, GSC auth, DB, notifications |
|
|
94
|
+
| `seo-pilot sync` | Sync yesterday's GSC data |
|
|
95
|
+
| `seo-pilot sync --backfill` | Load last 90 days |
|
|
96
|
+
| `seo-pilot review` | Weekly review (28d vs prev 28d) |
|
|
97
|
+
| `seo-pilot review --monthly` | Monthly review (90d trend) |
|
|
98
|
+
| `seo-pilot audit links` | Internal linking audit via HTTP crawl |
|
|
99
|
+
| `seo-pilot actions list` | Show open actions |
|
|
100
|
+
| `seo-pilot actions resolve <id>` | Mark action as resolved |
|
|
101
|
+
|
|
102
|
+
## Review schedule
|
|
103
|
+
|
|
104
|
+
| Frequency | Window | What it covers |
|
|
105
|
+
|-----------|--------|---------------|
|
|
106
|
+
| Weekly | 28 days vs previous 28 days | LHF, content gaps, rising queries, drops, title suggestions |
|
|
107
|
+
| Monthly (1st week) | 90 days, month-by-month | Trend analysis, position movers, action queue summary, stale action escalation |
|
|
108
|
+
|
|
109
|
+
## How scoring works
|
|
110
|
+
|
|
111
|
+
Every low-hanging-fruit page gets a composite score (0-100):
|
|
112
|
+
|
|
113
|
+
| Factor | Weight | Example |
|
|
114
|
+
|--------|--------|---------|
|
|
115
|
+
| Impression volume | 30% | 200 imp = 30/30 |
|
|
116
|
+
| Position (5-15 sweet spot) | 25% | pos 8 = 25/25 |
|
|
117
|
+
| CTR gap vs expected | 25% | pos 3 + 0% CTR (expected 11%) = 25/25 |
|
|
118
|
+
| Title quality | 10% | question format + year = 10/10 |
|
|
119
|
+
| Content freshness | 10% | current year = 10/10 |
|
|
120
|
+
|
|
121
|
+
Score 85+ = urgent (fix today). Score 70+ = action this week.
|
|
122
|
+
|
|
123
|
+
Expected CTR benchmarks (2026):
|
|
124
|
+
- Position 1: 28%, Position 3: 11%, Position 5: 7%, Position 10: 3%
|
|
125
|
+
|
|
126
|
+
## LLM providers
|
|
127
|
+
|
|
128
|
+
seo-pilot uses an LLM to generate title/meta suggestions. Supported providers:
|
|
129
|
+
|
|
130
|
+
| Provider | Config value | Model examples |
|
|
131
|
+
|----------|-------------|----------------|
|
|
132
|
+
| Google Gemini | `gemini` | gemini-2.0-flash |
|
|
133
|
+
| Anthropic Claude | `claude` | claude-sonnet-4-6 |
|
|
134
|
+
| OpenAI | `openai` | gpt-4o |
|
|
135
|
+
| Ollama (local) | `ollama` | llama3, mistral |
|
|
136
|
+
|
|
137
|
+
Title suggestions are optional. The analysis runs without an LLM.
|
|
138
|
+
|
|
139
|
+
## Internal linking audit
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
seo-pilot audit links
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Crawls your site via HTTP (no headless browser needed), maps all internal links, and identifies:
|
|
146
|
+
- **Orphan pages**: pages with zero inbound internal links
|
|
147
|
+
- **Broken links**: internal links pointing to 404s
|
|
148
|
+
- **Missing product links**: blog posts without a link to pricing/conversion pages
|
|
149
|
+
- **Cluster mapping**: groups pages into topic clusters
|
|
150
|
+
|
|
151
|
+
Output: `linking-map.md` in your project root.
|
|
152
|
+
|
|
153
|
+
## Docker
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Build
|
|
157
|
+
docker build -t seo-pilot .
|
|
158
|
+
|
|
159
|
+
# Run a review
|
|
160
|
+
docker run -v ./config.yaml:/app/config.yaml \
|
|
161
|
+
-v ./credentials.json:/app/credentials.json \
|
|
162
|
+
-e TELEGRAM_BOT_TOKEN=xxx \
|
|
163
|
+
-e GEMINI_API_KEY=xxx \
|
|
164
|
+
seo-pilot review
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Or with docker-compose:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
docker-compose run seo-pilot review
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Guidelines
|
|
174
|
+
|
|
175
|
+
seo-pilot includes default SEO guidelines at `guidelines/default.md`. These encode 2026 best practices for title tags, meta descriptions, content scoring, and internal linking.
|
|
176
|
+
|
|
177
|
+
Customize by editing the file or pointing to your own:
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
guidelines:
|
|
181
|
+
path: "./my-guidelines.md"
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Guidelines should be refreshed quarterly. The scoring engine reads thresholds from the guidelines.
|
|
185
|
+
|
|
186
|
+
## File structure
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
seo-pilot/
|
|
190
|
+
├── config.yaml # Your config (gitignored)
|
|
191
|
+
├── config.example.yaml # Template
|
|
192
|
+
├── credentials.json # GSC service account (gitignored)
|
|
193
|
+
├── seo-pilot.db # SQLite database (gitignored)
|
|
194
|
+
├── guidelines/
|
|
195
|
+
│ └── default.md # SEO best practices
|
|
196
|
+
├── templates/
|
|
197
|
+
│ ├── weekly_report.j2 # Weekly report template
|
|
198
|
+
│ └── monthly_report.j2 # Monthly report template
|
|
199
|
+
├── seo_pilot/
|
|
200
|
+
│ ├── cli.py # CLI commands
|
|
201
|
+
│ ├── config.py # Config loader
|
|
202
|
+
│ ├── gsc_client.py # Google Search Console API
|
|
203
|
+
│ ├── storage.py # SQLite/Postgres storage
|
|
204
|
+
│ ├── analyzer.py # Analysis engine
|
|
205
|
+
│ ├── changelog.py # Auto-changelog
|
|
206
|
+
│ ├── linking_audit.py # Internal link crawler
|
|
207
|
+
│ ├── notifier.py # Telegram/Slack/webhook
|
|
208
|
+
│ ├── llm.py # LLM title suggestions
|
|
209
|
+
│ └── reporter.py # Report generator
|
|
210
|
+
└── docs/
|
|
211
|
+
└── architecture.md # System design
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Roadmap
|
|
215
|
+
|
|
216
|
+
- [x] v0.1 — Core: GSC sync, analysis, action queue, changelog, CLI
|
|
217
|
+
- [ ] v0.2 — MCP server mode (use from Claude Code directly)
|
|
218
|
+
- [ ] v0.2 — Web dashboard (lightweight, static HTML)
|
|
219
|
+
- [ ] v0.2 — OAuth support (not just service account)
|
|
220
|
+
- [ ] v0.2 — Slack + Discord notifications
|
|
221
|
+
- [ ] v0.3 — Competitor watch plugin
|
|
222
|
+
- [ ] v0.3 — WordPress/CMS content discovery
|
|
223
|
+
|
|
224
|
+
## Contributing
|
|
225
|
+
|
|
226
|
+
Contributions welcome. Please open an issue first to discuss what you'd like to change.
|
|
227
|
+
|
|
228
|
+
```bash
|
|
229
|
+
# Development setup
|
|
230
|
+
git clone https://github.com/Palicz91/seo-pilot.git
|
|
231
|
+
cd seo-pilot
|
|
232
|
+
pip install -e ".[dev]"
|
|
233
|
+
pytest
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## License
|
|
237
|
+
|
|
238
|
+
MIT
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# seo-pilot configuration
|
|
2
|
+
# Copy to config.yaml and fill in your values
|
|
3
|
+
# Or run: seo-pilot init
|
|
4
|
+
|
|
5
|
+
site:
|
|
6
|
+
domain: "example.com"
|
|
7
|
+
gsc_property: "sc-domain:example.com" # or "https://example.com/"
|
|
8
|
+
sitemap: "https://example.com/sitemap.xml" # optional, auto-detected from robots.txt
|
|
9
|
+
|
|
10
|
+
auth:
|
|
11
|
+
gsc_credentials: "./credentials.json" # Google service account JSON
|
|
12
|
+
|
|
13
|
+
storage:
|
|
14
|
+
type: "sqlite" # sqlite | postgres
|
|
15
|
+
# SQLite (default, zero config):
|
|
16
|
+
path: "./seo-pilot.db"
|
|
17
|
+
# Postgres (optional):
|
|
18
|
+
# url: "postgresql://user:pass@localhost:5432/seo_pilot"
|
|
19
|
+
|
|
20
|
+
notifications:
|
|
21
|
+
- type: telegram
|
|
22
|
+
token_env: "TELEGRAM_BOT_TOKEN" # reads from env var
|
|
23
|
+
chat_id: "123456789"
|
|
24
|
+
# - type: slack
|
|
25
|
+
# webhook_env: "SLACK_WEBHOOK_URL"
|
|
26
|
+
# - type: webhook
|
|
27
|
+
# url: "https://your-endpoint.com/seo-events"
|
|
28
|
+
|
|
29
|
+
llm:
|
|
30
|
+
provider: "gemini" # claude | openai | gemini | ollama
|
|
31
|
+
model: "gemini-2.0-flash" # model name for the provider
|
|
32
|
+
api_key_env: "GEMINI_API_KEY" # reads from env var
|
|
33
|
+
# For Ollama:
|
|
34
|
+
# provider: "ollama"
|
|
35
|
+
# model: "llama3"
|
|
36
|
+
# base_url: "http://localhost:11434"
|
|
37
|
+
|
|
38
|
+
schedule:
|
|
39
|
+
weekly_review: "monday 05:30" # day + time (local timezone)
|
|
40
|
+
monthly_review: "first_monday" # runs on first Monday of each month
|
|
41
|
+
|
|
42
|
+
content:
|
|
43
|
+
# How to discover your pages (tried in order):
|
|
44
|
+
# 1. sitemap.xml (if configured above)
|
|
45
|
+
# 2. GSC data (pages with impressions)
|
|
46
|
+
# 3. Manual list below
|
|
47
|
+
blog_url_pattern: "/blog/" # URL prefix that identifies blog posts
|
|
48
|
+
# manual_urls:
|
|
49
|
+
# - "/blog/my-first-post"
|
|
50
|
+
# - "/blog/my-second-post"
|
|
51
|
+
|
|
52
|
+
guidelines:
|
|
53
|
+
path: "./guidelines/default.md" # SEO rules, customize or use default
|
|
54
|
+
|
|
55
|
+
baseline:
|
|
56
|
+
# Set after first run, or manually:
|
|
57
|
+
# weekly_impressions: 1000
|
|
58
|
+
# weekly_clicks: 50
|
|
59
|
+
# avg_position: 15.0
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
services:
|
|
2
|
+
seo-pilot:
|
|
3
|
+
build: .
|
|
4
|
+
volumes:
|
|
5
|
+
- ./config.yaml:/app/config.yaml:ro
|
|
6
|
+
- ./credentials.json:/app/credentials.json:ro
|
|
7
|
+
- ./data:/app/data
|
|
8
|
+
environment:
|
|
9
|
+
- TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}
|
|
10
|
+
- GEMINI_API_KEY=${GEMINI_API_KEY}
|
|
11
|
+
command: ["review"]
|