website-seo-audit 1.0.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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 zxhydfzr
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.
@@ -0,0 +1,238 @@
1
+ Metadata-Version: 2.4
2
+ Name: website-seo-audit
3
+ Version: 1.0.0
4
+ Summary: 网站SEO诊断 — crawl any website and report on-page, technical, and structured-data SEO issues. Zero config, no API keys, pure standard library.
5
+ Author: zxhydfzr
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/zxhydfzr/website-seo-audit
8
+ Project-URL: Repository, https://github.com/zxhydfzr/website-seo-audit
9
+ Keywords: seo,seo-audit,seo-analyzer,crawler,structured-data,json-ld,schema-org,site-audit
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Dynamic: license-file
20
+
21
+ <div align="center">
22
+
23
+ # 🔍 website-seo-audit
24
+
25
+ ### Crawl any website and get a graded SEO report — in seconds, with zero setup.
26
+
27
+ **English** · [简体中文](README.zh-CN.md)
28
+
29
+ [![Python](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
30
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
31
+ [![Zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#-why-its-different)
32
+ [![Agent Skill](https://img.shields.io/badge/agent-skill-8A2BE2.svg)](SKILL.md)
33
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](#-contributing)
34
+
35
+ </div>
36
+
37
+ A dependency-free SEO auditor you can run as a **command-line tool** _or_ install
38
+ as a **skill for your AI coding agent** (Claude Code, Codex, opencode, …). It
39
+ crawls a site, checks dozens of **on-page**, **technical**, and
40
+ **structured-data** signals, and hands you a scored report with a concrete fix
41
+ for every issue.
42
+
43
+ No API keys. No sign-up. No `pip install`. Just Python 3.8+ and the standard library.
44
+
45
+ ```bash
46
+ python3 -m seo_audit https://example.com
47
+ ```
48
+
49
+ ---
50
+
51
+ ## ✨ See it in action
52
+
53
+ ```
54
+ # 🔍 SEO Audit — https://example.com
55
+ Score: 72/100 (C) · 🔴 2 critical · 🟡 8 warnings · 🟢 15 notices
56
+ Crawled 23 pages · 45 internal links checked
57
+
58
+ ## 🔴 Critical (2)
59
+ ### Broken internal links (3×)
60
+ Internal link returns HTTP 404: https://example.com/old-page
61
+ - Fix: Fix or remove the link, or restore the target page (add a redirect if it moved).
62
+
63
+ ### Site not on HTTPS
64
+ - Fix: Install a TLS certificate and redirect all HTTP traffic to HTTPS.
65
+
66
+ ## 🟡 Warnings (8)
67
+ ### Missing meta description (6×)
68
+ ### Duplicate titles
69
+ ### Structured data missing fields — Article missing image, datePublished
70
+ ...
71
+ ```
72
+
73
+ 👉 Full example: [`examples/sample-report.md`](examples/sample-report.md)
74
+
75
+ ---
76
+
77
+ ## 🚀 Quick start
78
+
79
+ ```bash
80
+ git clone https://github.com/zxhydfzr/website-seo-audit.git
81
+ cd website-seo-audit
82
+ python3 -m seo_audit https://yoursite.com
83
+ ```
84
+
85
+ That's it. No virtualenv, no packages to install.
86
+
87
+ Prefer a global command? Install with [pipx](https://pipx.pypa.io/):
88
+
89
+ ```bash
90
+ pipx install git+https://github.com/zxhydfzr/website-seo-audit.git
91
+ seo-audit https://yoursite.com
92
+ ```
93
+
94
+ ---
95
+
96
+ ## 🤖 Use it inside your AI agent
97
+
98
+ This repo ships a [`SKILL.md`](SKILL.md), so any agent that supports the open
99
+ [Agent Skills](https://code.claude.com/docs/en/skills) format can pick it up.
100
+ Then just say: **"audit the SEO of https://example.com"** and your agent runs the
101
+ tool and explains the results.
102
+
103
+ | Agent | Install |
104
+ |---|---|
105
+ | **Claude Code** | `git clone https://github.com/zxhydfzr/website-seo-audit ~/.claude/skills/website-seo-audit` |
106
+ | **Codex** | Clone into your project — the bundled [`AGENTS.md`](AGENTS.md) tells it how to run |
107
+ | **opencode / others** | Clone anywhere the agent can read files and point it at `SKILL.md` |
108
+
109
+ ---
110
+
111
+ ## 🔬 What it checks
112
+
113
+ <table>
114
+ <tr><td valign="top" width="33%">
115
+
116
+ **On-page**
117
+ - `<title>` — present / length / duplicate
118
+ - Meta description — present / length
119
+ - `<h1>` & heading hierarchy
120
+ - Canonical tag
121
+ - Mobile viewport
122
+ - `<html lang>`
123
+ - Image `alt` text
124
+ - Thin content (CJK-aware)
125
+ - Open Graph tags
126
+ - Mixed content on HTTPS
127
+
128
+ </td><td valign="top" width="33%">
129
+
130
+ **Technical**
131
+ - HTTPS
132
+ - `robots.txt`
133
+ - `sitemap.xml`
134
+ - Broken internal links (4xx/5xx)
135
+ - Duplicate titles / meta
136
+ - Near-orphan pages
137
+ - Redirect handling
138
+
139
+ </td><td valign="top" width="33%">
140
+
141
+ **Structured data** ⭐
142
+ - Valid JSON-LD syntax
143
+ - `@type` present
144
+ - Required Schema.org fields
145
+ (Article, Product, Organization,
146
+ BreadcrumbList, FAQ, Recipe,
147
+ Event, …)
148
+ - ISO-8601 dates
149
+
150
+ </td></tr>
151
+ </table>
152
+
153
+ ---
154
+
155
+ ## ⭐ Why it's different
156
+
157
+ - **Structured-data aware.** Most quick SEO checkers stop at titles and headings.
158
+ This one validates your **JSON-LD / Schema.org** markup — the signal search
159
+ engines and **AI answer engines** use to understand and _cite_ your pages.
160
+ - **Zero dependencies.** Only the Python standard library, so it runs anywhere
161
+ Python does — laptops, CI, containers, a locked-down server.
162
+ - **Agent-native.** Ships as a portable skill, so your AI assistant can run a full
163
+ audit and walk you through the fixes conversationally.
164
+ - **Polite & safe.** Respects `robots.txt`, sends a real User-Agent, rate-limits
165
+ itself, and only crawls the site you point it at.
166
+
167
+ ---
168
+
169
+ ## ⚙️ Options
170
+
171
+ | Option | Default | Meaning |
172
+ |---|---|---|
173
+ | `-1`, `--single` | off | Audit only the given URL (no crawl) |
174
+ | `--max-pages N` | 50 | Max pages to crawl |
175
+ | `--max-depth N` | 3 | Max crawl depth |
176
+ | `--json` | off | Machine-readable JSON output |
177
+ | `-o, --output FILE` | — | Write the report to a file |
178
+ | `--ignore-robots` | off | Crawl even if robots.txt disallows (your own sites) |
179
+ | `--no-link-check` | off | Skip broken-link detection (faster) |
180
+ | `-q, --quiet` | off | Suppress crawl progress |
181
+
182
+ The command exits non-zero when any **critical** issue is found, so you can gate CI:
183
+
184
+ ```bash
185
+ seo-audit https://yoursite.com --json -o seo.json || echo "SEO regressions!"
186
+ ```
187
+
188
+ ## 📊 How the score works
189
+
190
+ Starts at 100 and deducts, with per-severity caps so a big site can't collapse on
191
+ notices alone: 🔴 −15 each · 🟡 −3 each · 🟢 −1 each.
192
+ Grades: **A** ≥90 · **B** ≥80 · **C** ≥70 · **D** ≥55 · **F** below.
193
+
194
+ ## 🗺️ Roadmap
195
+
196
+ - [ ] Page-speed / Core Web Vitals signals
197
+ - [ ] hreflang & internationalization checks
198
+ - [ ] HTML report export
199
+ - [ ] Optional sitemap-seeded crawl (audit every listed URL)
200
+
201
+ Ideas and PRs welcome — see below.
202
+
203
+ ## 🤝 Contributing
204
+
205
+ Issues and pull requests are very welcome. The codebase is small, typed, and
206
+ dependency-free by design; please keep it that way. Run the tests with:
207
+
208
+ ```bash
209
+ python -m unittest discover -s tests
210
+ ```
211
+
212
+ ## 🧭 Prior art & credits
213
+
214
+ `website-seo-audit` is written from scratch, with no third-party code — that's
215
+ the whole point of "zero dependencies." Its checks follow widely-published SEO
216
+ guidance (Google Search documentation and the best practices you'll find echoed
217
+ across the industry). If you're weighing options, two well-known open-source
218
+ tools cover nearby ground and are worth a look:
219
+ [python-seo-analyzer](https://github.com/sethblack/python-seo-analyzer) and
220
+ [seonaut](https://github.com/StJudeWasHere/seonaut).
221
+
222
+ Where this project puts its emphasis: **zero dependencies**, **install-as-an-
223
+ agent-skill** packaging, and **structured-data (JSON-LD / Schema.org)
224
+ validation**.
225
+
226
+ ## 📄 License
227
+
228
+ [MIT](LICENSE) — free for personal and commercial use.
229
+
230
+ ---
231
+
232
+ <div align="center">
233
+
234
+ **If this saved you time, a ⭐ helps others find it.**
235
+
236
+ Made for everyone who wants clean SEO without a dashboard login.
237
+
238
+ </div>
@@ -0,0 +1,218 @@
1
+ <div align="center">
2
+
3
+ # 🔍 website-seo-audit
4
+
5
+ ### Crawl any website and get a graded SEO report — in seconds, with zero setup.
6
+
7
+ **English** · [简体中文](README.zh-CN.md)
8
+
9
+ [![Python](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/)
10
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
11
+ [![Zero dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](#-why-its-different)
12
+ [![Agent Skill](https://img.shields.io/badge/agent-skill-8A2BE2.svg)](SKILL.md)
13
+ [![PRs welcome](https://img.shields.io/badge/PRs-welcome-orange.svg)](#-contributing)
14
+
15
+ </div>
16
+
17
+ A dependency-free SEO auditor you can run as a **command-line tool** _or_ install
18
+ as a **skill for your AI coding agent** (Claude Code, Codex, opencode, …). It
19
+ crawls a site, checks dozens of **on-page**, **technical**, and
20
+ **structured-data** signals, and hands you a scored report with a concrete fix
21
+ for every issue.
22
+
23
+ No API keys. No sign-up. No `pip install`. Just Python 3.8+ and the standard library.
24
+
25
+ ```bash
26
+ python3 -m seo_audit https://example.com
27
+ ```
28
+
29
+ ---
30
+
31
+ ## ✨ See it in action
32
+
33
+ ```
34
+ # 🔍 SEO Audit — https://example.com
35
+ Score: 72/100 (C) · 🔴 2 critical · 🟡 8 warnings · 🟢 15 notices
36
+ Crawled 23 pages · 45 internal links checked
37
+
38
+ ## 🔴 Critical (2)
39
+ ### Broken internal links (3×)
40
+ Internal link returns HTTP 404: https://example.com/old-page
41
+ - Fix: Fix or remove the link, or restore the target page (add a redirect if it moved).
42
+
43
+ ### Site not on HTTPS
44
+ - Fix: Install a TLS certificate and redirect all HTTP traffic to HTTPS.
45
+
46
+ ## 🟡 Warnings (8)
47
+ ### Missing meta description (6×)
48
+ ### Duplicate titles
49
+ ### Structured data missing fields — Article missing image, datePublished
50
+ ...
51
+ ```
52
+
53
+ 👉 Full example: [`examples/sample-report.md`](examples/sample-report.md)
54
+
55
+ ---
56
+
57
+ ## 🚀 Quick start
58
+
59
+ ```bash
60
+ git clone https://github.com/zxhydfzr/website-seo-audit.git
61
+ cd website-seo-audit
62
+ python3 -m seo_audit https://yoursite.com
63
+ ```
64
+
65
+ That's it. No virtualenv, no packages to install.
66
+
67
+ Prefer a global command? Install with [pipx](https://pipx.pypa.io/):
68
+
69
+ ```bash
70
+ pipx install git+https://github.com/zxhydfzr/website-seo-audit.git
71
+ seo-audit https://yoursite.com
72
+ ```
73
+
74
+ ---
75
+
76
+ ## 🤖 Use it inside your AI agent
77
+
78
+ This repo ships a [`SKILL.md`](SKILL.md), so any agent that supports the open
79
+ [Agent Skills](https://code.claude.com/docs/en/skills) format can pick it up.
80
+ Then just say: **"audit the SEO of https://example.com"** and your agent runs the
81
+ tool and explains the results.
82
+
83
+ | Agent | Install |
84
+ |---|---|
85
+ | **Claude Code** | `git clone https://github.com/zxhydfzr/website-seo-audit ~/.claude/skills/website-seo-audit` |
86
+ | **Codex** | Clone into your project — the bundled [`AGENTS.md`](AGENTS.md) tells it how to run |
87
+ | **opencode / others** | Clone anywhere the agent can read files and point it at `SKILL.md` |
88
+
89
+ ---
90
+
91
+ ## 🔬 What it checks
92
+
93
+ <table>
94
+ <tr><td valign="top" width="33%">
95
+
96
+ **On-page**
97
+ - `<title>` — present / length / duplicate
98
+ - Meta description — present / length
99
+ - `<h1>` & heading hierarchy
100
+ - Canonical tag
101
+ - Mobile viewport
102
+ - `<html lang>`
103
+ - Image `alt` text
104
+ - Thin content (CJK-aware)
105
+ - Open Graph tags
106
+ - Mixed content on HTTPS
107
+
108
+ </td><td valign="top" width="33%">
109
+
110
+ **Technical**
111
+ - HTTPS
112
+ - `robots.txt`
113
+ - `sitemap.xml`
114
+ - Broken internal links (4xx/5xx)
115
+ - Duplicate titles / meta
116
+ - Near-orphan pages
117
+ - Redirect handling
118
+
119
+ </td><td valign="top" width="33%">
120
+
121
+ **Structured data** ⭐
122
+ - Valid JSON-LD syntax
123
+ - `@type` present
124
+ - Required Schema.org fields
125
+ (Article, Product, Organization,
126
+ BreadcrumbList, FAQ, Recipe,
127
+ Event, …)
128
+ - ISO-8601 dates
129
+
130
+ </td></tr>
131
+ </table>
132
+
133
+ ---
134
+
135
+ ## ⭐ Why it's different
136
+
137
+ - **Structured-data aware.** Most quick SEO checkers stop at titles and headings.
138
+ This one validates your **JSON-LD / Schema.org** markup — the signal search
139
+ engines and **AI answer engines** use to understand and _cite_ your pages.
140
+ - **Zero dependencies.** Only the Python standard library, so it runs anywhere
141
+ Python does — laptops, CI, containers, a locked-down server.
142
+ - **Agent-native.** Ships as a portable skill, so your AI assistant can run a full
143
+ audit and walk you through the fixes conversationally.
144
+ - **Polite & safe.** Respects `robots.txt`, sends a real User-Agent, rate-limits
145
+ itself, and only crawls the site you point it at.
146
+
147
+ ---
148
+
149
+ ## ⚙️ Options
150
+
151
+ | Option | Default | Meaning |
152
+ |---|---|---|
153
+ | `-1`, `--single` | off | Audit only the given URL (no crawl) |
154
+ | `--max-pages N` | 50 | Max pages to crawl |
155
+ | `--max-depth N` | 3 | Max crawl depth |
156
+ | `--json` | off | Machine-readable JSON output |
157
+ | `-o, --output FILE` | — | Write the report to a file |
158
+ | `--ignore-robots` | off | Crawl even if robots.txt disallows (your own sites) |
159
+ | `--no-link-check` | off | Skip broken-link detection (faster) |
160
+ | `-q, --quiet` | off | Suppress crawl progress |
161
+
162
+ The command exits non-zero when any **critical** issue is found, so you can gate CI:
163
+
164
+ ```bash
165
+ seo-audit https://yoursite.com --json -o seo.json || echo "SEO regressions!"
166
+ ```
167
+
168
+ ## 📊 How the score works
169
+
170
+ Starts at 100 and deducts, with per-severity caps so a big site can't collapse on
171
+ notices alone: 🔴 −15 each · 🟡 −3 each · 🟢 −1 each.
172
+ Grades: **A** ≥90 · **B** ≥80 · **C** ≥70 · **D** ≥55 · **F** below.
173
+
174
+ ## 🗺️ Roadmap
175
+
176
+ - [ ] Page-speed / Core Web Vitals signals
177
+ - [ ] hreflang & internationalization checks
178
+ - [ ] HTML report export
179
+ - [ ] Optional sitemap-seeded crawl (audit every listed URL)
180
+
181
+ Ideas and PRs welcome — see below.
182
+
183
+ ## 🤝 Contributing
184
+
185
+ Issues and pull requests are very welcome. The codebase is small, typed, and
186
+ dependency-free by design; please keep it that way. Run the tests with:
187
+
188
+ ```bash
189
+ python -m unittest discover -s tests
190
+ ```
191
+
192
+ ## 🧭 Prior art & credits
193
+
194
+ `website-seo-audit` is written from scratch, with no third-party code — that's
195
+ the whole point of "zero dependencies." Its checks follow widely-published SEO
196
+ guidance (Google Search documentation and the best practices you'll find echoed
197
+ across the industry). If you're weighing options, two well-known open-source
198
+ tools cover nearby ground and are worth a look:
199
+ [python-seo-analyzer](https://github.com/sethblack/python-seo-analyzer) and
200
+ [seonaut](https://github.com/StJudeWasHere/seonaut).
201
+
202
+ Where this project puts its emphasis: **zero dependencies**, **install-as-an-
203
+ agent-skill** packaging, and **structured-data (JSON-LD / Schema.org)
204
+ validation**.
205
+
206
+ ## 📄 License
207
+
208
+ [MIT](LICENSE) — free for personal and commercial use.
209
+
210
+ ---
211
+
212
+ <div align="center">
213
+
214
+ **If this saved you time, a ⭐ helps others find it.**
215
+
216
+ Made for everyone who wants clean SEO without a dashboard login.
217
+
218
+ </div>
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "website-seo-audit"
7
+ version = "1.0.0"
8
+ description = "网站SEO诊断 — crawl any website and report on-page, technical, and structured-data SEO issues. Zero config, no API keys, pure standard library."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "zxhydfzr" }]
13
+ keywords = ["seo", "seo-audit", "seo-analyzer", "crawler", "structured-data", "json-ld", "schema-org", "site-audit"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: Developers",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Topic :: Internet :: WWW/HTTP :: Site Management",
21
+ ]
22
+ # No runtime dependencies — standard library only, on purpose.
23
+ dependencies = []
24
+
25
+ [project.urls]
26
+ Homepage = "https://github.com/zxhydfzr/website-seo-audit"
27
+ Repository = "https://github.com/zxhydfzr/website-seo-audit"
28
+
29
+ [project.scripts]
30
+ seo-audit = "seo_audit.cli:main"
31
+
32
+ [tool.setuptools]
33
+ packages = ["seo_audit"]
@@ -0,0 +1,7 @@
1
+ """website-seo-audit (网站SEO诊断) — a zero-config, dependency-free website SEO auditor.
2
+
3
+ Crawl any website and get a graded report of on-page, technical and
4
+ structured-data SEO issues. Pure Python standard library, no API keys.
5
+ """
6
+
7
+ __version__ = "1.0.0"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())