citable-cli 0.4.1__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 genzagents
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,201 @@
1
+ Metadata-Version: 2.4
2
+ Name: citable-cli
3
+ Version: 0.4.1
4
+ Summary: Can ChatGPT, Claude and Perplexity read and cite your site? Checks robots.txt, edge blocks, llms.txt, schema and JS-only content. Zero dependencies. Also an MCP server.
5
+ Author: genzagents
6
+ License: MIT
7
+ Project-URL: Homepage, https://genzagents.github.io/citable/
8
+ Project-URL: Source, https://github.com/genzagents/citable
9
+ Keywords: llms.txt,robots.txt,GPTBot,ClaudeBot,PerplexityBot,AEO,GEO,AI search,MCP
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
13
+ Requires-Python: >=3.9
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Dynamic: license-file
17
+
18
+ # citable
19
+
20
+ Can ChatGPT, Claude and Perplexity actually read and cite your site?
21
+
22
+ Most "AI visibility" checkers read `robots.txt` and stop. `citable` fetches your homepage **as each AI bot**
23
+ and reports the blocks that `robots.txt` never mentions (Cloudflare "Block AI bots", WAF rules, rate limiters),
24
+ then checks the rest of the list: `llms.txt`, JSON-LD, title and description, JS-only content, sitemap, canonical.
25
+ Score out of 100, every failure with the fix. Also runs as an **MCP server** so your agent can check sites for you.
26
+
27
+ Zero dependencies. One file. Python 3.9+.
28
+
29
+ ```bash
30
+ pipx install git+https://github.com/genzagents/citable # or: uvx --from git+https://github.com/genzagents/citable citable
31
+ citable example.com # report
32
+ citable example.com --json # for scripts and CI (exit 1 if below --min-score=N)
33
+ citable example.com --llms-txt # a starter llms.txt built from your homepage
34
+ citable watch a.com b.com # weekly watch: GitHub issue per site, comment (email) on regressions
35
+ citable track a.com "best X" "how Y" # prompt tracking: which engines cite you, who gets cited instead
36
+ ```
37
+
38
+ No install at all:
39
+
40
+ ```bash
41
+ curl -sL https://raw.githubusercontent.com/genzagents/citable/main/citable/__init__.py | python3 - example.com
42
+ ```
43
+
44
+ ## What a run looks like
45
+
46
+ ```
47
+ citable 0.3.0: https://reddit.com/
48
+ score 13/100 grade F (final URL https://www.reddit.com/)
49
+
50
+ [FAIL] 0/15 robots.txt allows answer engines: robots.txt blocks: OAI-SearchBot, ChatGPT-User, Claude-SearchBot, ...
51
+ [FAIL] 0/20 Answer engines not blocked at the edge: Fetching the homepage as a bot: ChatGPT-User got HTTP 403; a browser got 200.
52
+ fix: Your CDN or WAF (Cloudflare 'Block AI bots', bot-fight mode, a rate limiter) is refusing them ...
53
+ [FAIL] 0/15 /llms.txt: /llms.txt returns HTTP 404.
54
+ ...
55
+ Bot Vendor Role robots.txt live fetch
56
+ OAI-SearchBot OpenAI answer block HTTP 200
57
+ ChatGPT-User OpenAI answer block HTTP 403 <- BLOCKED
58
+ Claude-SearchBot Anthropic answer block HTTP 200
59
+ ...
60
+ ```
61
+
62
+ ## What it checks
63
+
64
+ | Check | Points | Why it matters |
65
+ |---|---|---|
66
+ | robots.txt allows the **answer** bots (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User, DuckAssistBot, Bingbot, Googlebot) | 15 | These fetch pages to answer live questions and cite the source. Blocked means never cited. |
67
+ | Not blocked at the edge: homepage fetched **as** each of those bots returns what a browser gets | 20 | CDN and WAF "block AI" toggles stop bots that robots.txt allows. Nothing else on this list matters until this passes. |
68
+ | Training crawlers (GPTBot, ClaudeBot, Google-Extended, CCBot, Applebot-Extended, meta-externalagent, Amazonbot, Bytespider) | info | Blocking them is a legitimate choice and does not affect citations. Reported, never penalised. |
69
+ | `/llms.txt` present, plain text, with an H1, a `> summary` and links | 15 | The convention answer engines and agents read first. A soft-404 HTML page counts as missing. |
70
+ | Content readable without JavaScript (words in the raw HTML) | 15 | Most AI crawlers do not run JS. A client-rendered shell is invisible to them. |
71
+ | JSON-LD structured data (Organization, WebSite, Article, FAQPage...) | 10 | Entities and FAQs get quoted directly. |
72
+ | Title and meta description, sensible lengths | 8 | Quoted verbatim in answers. |
73
+ | HTTPS, response time, canonical, Open Graph, sitemap, `<html lang>`, no `noindex` | 22 | Hygiene that decides which URL gets the citation. |
74
+
75
+ ## As an MCP server (Claude Code, Claude Desktop, Cursor, any MCP client)
76
+
77
+ Tools: `check_site(url, live=true)` and `draft_llms_txt(url)`.
78
+
79
+ Claude Code plugin (includes the MCP server and a skill that knows how to act on the report):
80
+
81
+ ```bash
82
+ claude plugin marketplace add genzagents/marketplace
83
+ claude plugin install citable@genzagents
84
+ ```
85
+
86
+ Any MCP client, by hand:
87
+
88
+ ```json
89
+ { "mcpServers": { "citable": { "command": "python3", "args": ["/path/to/citable/citable/__init__.py", "mcp"] } } }
90
+ ```
91
+
92
+ The server speaks MCP over stdio with no dependencies, so it runs anywhere Python does.
93
+
94
+ ## In CI
95
+
96
+ Fail the build when a deploy breaks AI access (a new WAF rule, a lost `llms.txt`, a `Disallow: /` that slipped in):
97
+
98
+ ```bash
99
+ citable yoursite.com --min-score=70 --json > citable.json
100
+ ```
101
+
102
+ ## Watch
103
+
104
+ A deploy that flips a WAF toggle silently removes you from every AI answer. The watch is the alarm. It runs as a
105
+ GitHub Action in any repo you own (it need not be the site's repo), keeps one issue per site up to date, and
106
+ **comments on that issue the moment an answer bot is blocked, `llms.txt` disappears, the site goes down or the
107
+ score drops**, which GitHub emails to you. No server, no account, no dependencies. Example: [issue #1](https://github.com/genzagents/citable/issues/1) watches this project's own page.
108
+
109
+ Copy [`docs/watch.yml`](docs/watch.yml) to `.github/workflows/citable-watch.yml`:
110
+
111
+ ```yaml
112
+ on:
113
+ schedule: [{ cron: "17 6 * * 1" }] # Mondays
114
+ workflow_dispatch:
115
+ permissions: { issues: write, contents: read }
116
+ jobs:
117
+ watch:
118
+ runs-on: ubuntu-latest
119
+ steps:
120
+ - uses: genzagents/citable@v0.4.1
121
+ with:
122
+ sites: |
123
+ example.com
124
+ docs.example.com
125
+ # min-score: 75
126
+ ```
127
+
128
+ Inputs: `sites` (required), `min-score` (fail below it), `live` (fetch as each bot, default true), `issue`
129
+ (track in an issue, default true), `notify` (login to @mention on a regression, default repo owner),
130
+ `fail-on-regression` (default true). Outputs: `score`, `regressed`, `changed`. Same thing from a shell where `gh` is logged in:
131
+
132
+ ```bash
133
+ citable watch example.com docs.example.com --repo=you/your-repo --notify=you
134
+ ```
135
+
136
+ **Hosted, £9/month**: the same watch run by us, no repo needed, up to 5 domains, with the weekly email.
137
+ Not live yet; press the button to tell us you want it, that is what decides whether it gets built:
138
+
139
+ [**I want the hosted weekly watch →**](https://github.com/genzagents/citable/issues/new?title=I+want+the+weekly+watch&body=Domain(s):%0A%0AWhat+would+you+pay+per+month%3F)
140
+
141
+ ## Track
142
+
143
+ The watch tells you whether engines *can* read you. Track tells you whether they *do*: for the questions you want to
144
+ be the answer to, does ChatGPT, Claude or Perplexity link to your site, and who gets linked instead?
145
+
146
+ ```bash
147
+ citable track example.com "best tools for X" "how do I Y" --brand=Example
148
+ ```
149
+
150
+ ```
151
+ ## citable track: example.com
152
+
153
+ **Visibility 50%**: share of prompt-and-engine pairs where an answer linked to your site.
154
+
155
+ | Prompt | anthropic | openai | perplexity |
156
+ |---|---|---|---|
157
+ | best tools for X | **cited** | mentioned | **cited** |
158
+ | how do I Y | no | no | no |
159
+
160
+ **Who gets cited instead** (answers citing them): rival.io (4), other.org (2)
161
+ ```
162
+
163
+ Engines: `anthropic` (ANTHROPIC_API_KEY, the web_search tool), `openai` (OPENAI_API_KEY, Responses API web search),
164
+ `perplexity` (PERPLEXITY_API_KEY, sonar) and `claude-code` (the `claude` CLI on your machine, no key). Every engine
165
+ whose key is present runs; `--engines=` picks a subset. Add `--issue --repo=you/repo` (or run it from the Action with
166
+ a `prompts:` input) and it keeps a "citable track: example.com" issue up to date and comments when a citation is
167
+ lost, which is the weekly email the paid tools charge $29 to $39 a month for. Bring your own keys; a 10-prompt run on
168
+ three engines costs a few cents.
169
+
170
+ ## Hosted (£9/month)
171
+
172
+ No repo, no keys, no cron: pay once a month, type your sites (up to 5), the prompts that matter (up to 10) and your
173
+ brand at checkout, and the first report lands in your inbox within the hour. After that you get an email the moment
174
+ something regresses and a digest once a week with the prompt tracking. Cancel from the receipt.
175
+
176
+ The runner is in this repo (`citable hosted`), so you can also run the same thing yourself for your own customers:
177
+ it polls [Polar](https://polar.sh) for active subscriptions, keeps one small state file per subscriber, and sends
178
+ through [Resend](https://resend.com). Zero dependencies, one hourly cron. See [docs/HOSTED.md](docs/HOSTED.md).
179
+
180
+ ```bash
181
+ citable hosted run --dry-run # against Polar, prints the emails instead of sending
182
+ citable hosted run --subscribers=subs.json # against a local list (no Polar), e.g. for your own clients
183
+ citable hosted launchd # a launchd plist that runs it hourly on a Mac
184
+ ```
185
+
186
+ ## Notes
187
+
188
+ - MCP registry name: `mcp-name: io.github.genzagents/citable` (PyPI package `citable-cli`; the import and the command stay `citable`).
189
+
190
+ - Bot user agents and roles follow the vendors' published strings (OpenAI, Anthropic, Perplexity). Role "answer" = fetches
191
+ to answer or cite in a live conversation; "train" = builds training corpora.
192
+ - The edge check compares HTTP status only. A site that returns 200 with a challenge page to bots will pass; file an issue with the domain and it gets a heuristic.
193
+ - `--no-live` skips the bot fetches (faster, robots.txt only).
194
+
195
+ ## Development
196
+
197
+ ```bash
198
+ python3 -m unittest discover -s tests -v
199
+ ```
200
+
201
+ MIT. Built by [genzagents](https://github.com/genzagents).
@@ -0,0 +1,184 @@
1
+ # citable
2
+
3
+ Can ChatGPT, Claude and Perplexity actually read and cite your site?
4
+
5
+ Most "AI visibility" checkers read `robots.txt` and stop. `citable` fetches your homepage **as each AI bot**
6
+ and reports the blocks that `robots.txt` never mentions (Cloudflare "Block AI bots", WAF rules, rate limiters),
7
+ then checks the rest of the list: `llms.txt`, JSON-LD, title and description, JS-only content, sitemap, canonical.
8
+ Score out of 100, every failure with the fix. Also runs as an **MCP server** so your agent can check sites for you.
9
+
10
+ Zero dependencies. One file. Python 3.9+.
11
+
12
+ ```bash
13
+ pipx install git+https://github.com/genzagents/citable # or: uvx --from git+https://github.com/genzagents/citable citable
14
+ citable example.com # report
15
+ citable example.com --json # for scripts and CI (exit 1 if below --min-score=N)
16
+ citable example.com --llms-txt # a starter llms.txt built from your homepage
17
+ citable watch a.com b.com # weekly watch: GitHub issue per site, comment (email) on regressions
18
+ citable track a.com "best X" "how Y" # prompt tracking: which engines cite you, who gets cited instead
19
+ ```
20
+
21
+ No install at all:
22
+
23
+ ```bash
24
+ curl -sL https://raw.githubusercontent.com/genzagents/citable/main/citable/__init__.py | python3 - example.com
25
+ ```
26
+
27
+ ## What a run looks like
28
+
29
+ ```
30
+ citable 0.3.0: https://reddit.com/
31
+ score 13/100 grade F (final URL https://www.reddit.com/)
32
+
33
+ [FAIL] 0/15 robots.txt allows answer engines: robots.txt blocks: OAI-SearchBot, ChatGPT-User, Claude-SearchBot, ...
34
+ [FAIL] 0/20 Answer engines not blocked at the edge: Fetching the homepage as a bot: ChatGPT-User got HTTP 403; a browser got 200.
35
+ fix: Your CDN or WAF (Cloudflare 'Block AI bots', bot-fight mode, a rate limiter) is refusing them ...
36
+ [FAIL] 0/15 /llms.txt: /llms.txt returns HTTP 404.
37
+ ...
38
+ Bot Vendor Role robots.txt live fetch
39
+ OAI-SearchBot OpenAI answer block HTTP 200
40
+ ChatGPT-User OpenAI answer block HTTP 403 <- BLOCKED
41
+ Claude-SearchBot Anthropic answer block HTTP 200
42
+ ...
43
+ ```
44
+
45
+ ## What it checks
46
+
47
+ | Check | Points | Why it matters |
48
+ |---|---|---|
49
+ | robots.txt allows the **answer** bots (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User, DuckAssistBot, Bingbot, Googlebot) | 15 | These fetch pages to answer live questions and cite the source. Blocked means never cited. |
50
+ | Not blocked at the edge: homepage fetched **as** each of those bots returns what a browser gets | 20 | CDN and WAF "block AI" toggles stop bots that robots.txt allows. Nothing else on this list matters until this passes. |
51
+ | Training crawlers (GPTBot, ClaudeBot, Google-Extended, CCBot, Applebot-Extended, meta-externalagent, Amazonbot, Bytespider) | info | Blocking them is a legitimate choice and does not affect citations. Reported, never penalised. |
52
+ | `/llms.txt` present, plain text, with an H1, a `> summary` and links | 15 | The convention answer engines and agents read first. A soft-404 HTML page counts as missing. |
53
+ | Content readable without JavaScript (words in the raw HTML) | 15 | Most AI crawlers do not run JS. A client-rendered shell is invisible to them. |
54
+ | JSON-LD structured data (Organization, WebSite, Article, FAQPage...) | 10 | Entities and FAQs get quoted directly. |
55
+ | Title and meta description, sensible lengths | 8 | Quoted verbatim in answers. |
56
+ | HTTPS, response time, canonical, Open Graph, sitemap, `<html lang>`, no `noindex` | 22 | Hygiene that decides which URL gets the citation. |
57
+
58
+ ## As an MCP server (Claude Code, Claude Desktop, Cursor, any MCP client)
59
+
60
+ Tools: `check_site(url, live=true)` and `draft_llms_txt(url)`.
61
+
62
+ Claude Code plugin (includes the MCP server and a skill that knows how to act on the report):
63
+
64
+ ```bash
65
+ claude plugin marketplace add genzagents/marketplace
66
+ claude plugin install citable@genzagents
67
+ ```
68
+
69
+ Any MCP client, by hand:
70
+
71
+ ```json
72
+ { "mcpServers": { "citable": { "command": "python3", "args": ["/path/to/citable/citable/__init__.py", "mcp"] } } }
73
+ ```
74
+
75
+ The server speaks MCP over stdio with no dependencies, so it runs anywhere Python does.
76
+
77
+ ## In CI
78
+
79
+ Fail the build when a deploy breaks AI access (a new WAF rule, a lost `llms.txt`, a `Disallow: /` that slipped in):
80
+
81
+ ```bash
82
+ citable yoursite.com --min-score=70 --json > citable.json
83
+ ```
84
+
85
+ ## Watch
86
+
87
+ A deploy that flips a WAF toggle silently removes you from every AI answer. The watch is the alarm. It runs as a
88
+ GitHub Action in any repo you own (it need not be the site's repo), keeps one issue per site up to date, and
89
+ **comments on that issue the moment an answer bot is blocked, `llms.txt` disappears, the site goes down or the
90
+ score drops**, which GitHub emails to you. No server, no account, no dependencies. Example: [issue #1](https://github.com/genzagents/citable/issues/1) watches this project's own page.
91
+
92
+ Copy [`docs/watch.yml`](docs/watch.yml) to `.github/workflows/citable-watch.yml`:
93
+
94
+ ```yaml
95
+ on:
96
+ schedule: [{ cron: "17 6 * * 1" }] # Mondays
97
+ workflow_dispatch:
98
+ permissions: { issues: write, contents: read }
99
+ jobs:
100
+ watch:
101
+ runs-on: ubuntu-latest
102
+ steps:
103
+ - uses: genzagents/citable@v0.4.1
104
+ with:
105
+ sites: |
106
+ example.com
107
+ docs.example.com
108
+ # min-score: 75
109
+ ```
110
+
111
+ Inputs: `sites` (required), `min-score` (fail below it), `live` (fetch as each bot, default true), `issue`
112
+ (track in an issue, default true), `notify` (login to @mention on a regression, default repo owner),
113
+ `fail-on-regression` (default true). Outputs: `score`, `regressed`, `changed`. Same thing from a shell where `gh` is logged in:
114
+
115
+ ```bash
116
+ citable watch example.com docs.example.com --repo=you/your-repo --notify=you
117
+ ```
118
+
119
+ **Hosted, £9/month**: the same watch run by us, no repo needed, up to 5 domains, with the weekly email.
120
+ Not live yet; press the button to tell us you want it, that is what decides whether it gets built:
121
+
122
+ [**I want the hosted weekly watch →**](https://github.com/genzagents/citable/issues/new?title=I+want+the+weekly+watch&body=Domain(s):%0A%0AWhat+would+you+pay+per+month%3F)
123
+
124
+ ## Track
125
+
126
+ The watch tells you whether engines *can* read you. Track tells you whether they *do*: for the questions you want to
127
+ be the answer to, does ChatGPT, Claude or Perplexity link to your site, and who gets linked instead?
128
+
129
+ ```bash
130
+ citable track example.com "best tools for X" "how do I Y" --brand=Example
131
+ ```
132
+
133
+ ```
134
+ ## citable track: example.com
135
+
136
+ **Visibility 50%**: share of prompt-and-engine pairs where an answer linked to your site.
137
+
138
+ | Prompt | anthropic | openai | perplexity |
139
+ |---|---|---|---|
140
+ | best tools for X | **cited** | mentioned | **cited** |
141
+ | how do I Y | no | no | no |
142
+
143
+ **Who gets cited instead** (answers citing them): rival.io (4), other.org (2)
144
+ ```
145
+
146
+ Engines: `anthropic` (ANTHROPIC_API_KEY, the web_search tool), `openai` (OPENAI_API_KEY, Responses API web search),
147
+ `perplexity` (PERPLEXITY_API_KEY, sonar) and `claude-code` (the `claude` CLI on your machine, no key). Every engine
148
+ whose key is present runs; `--engines=` picks a subset. Add `--issue --repo=you/repo` (or run it from the Action with
149
+ a `prompts:` input) and it keeps a "citable track: example.com" issue up to date and comments when a citation is
150
+ lost, which is the weekly email the paid tools charge $29 to $39 a month for. Bring your own keys; a 10-prompt run on
151
+ three engines costs a few cents.
152
+
153
+ ## Hosted (£9/month)
154
+
155
+ No repo, no keys, no cron: pay once a month, type your sites (up to 5), the prompts that matter (up to 10) and your
156
+ brand at checkout, and the first report lands in your inbox within the hour. After that you get an email the moment
157
+ something regresses and a digest once a week with the prompt tracking. Cancel from the receipt.
158
+
159
+ The runner is in this repo (`citable hosted`), so you can also run the same thing yourself for your own customers:
160
+ it polls [Polar](https://polar.sh) for active subscriptions, keeps one small state file per subscriber, and sends
161
+ through [Resend](https://resend.com). Zero dependencies, one hourly cron. See [docs/HOSTED.md](docs/HOSTED.md).
162
+
163
+ ```bash
164
+ citable hosted run --dry-run # against Polar, prints the emails instead of sending
165
+ citable hosted run --subscribers=subs.json # against a local list (no Polar), e.g. for your own clients
166
+ citable hosted launchd # a launchd plist that runs it hourly on a Mac
167
+ ```
168
+
169
+ ## Notes
170
+
171
+ - MCP registry name: `mcp-name: io.github.genzagents/citable` (PyPI package `citable-cli`; the import and the command stay `citable`).
172
+
173
+ - Bot user agents and roles follow the vendors' published strings (OpenAI, Anthropic, Perplexity). Role "answer" = fetches
174
+ to answer or cite in a live conversation; "train" = builds training corpora.
175
+ - The edge check compares HTTP status only. A site that returns 200 with a challenge page to bots will pass; file an issue with the domain and it gets a heuristic.
176
+ - `--no-live` skips the bot fetches (faster, robots.txt only).
177
+
178
+ ## Development
179
+
180
+ ```bash
181
+ python3 -m unittest discover -s tests -v
182
+ ```
183
+
184
+ MIT. Built by [genzagents](https://github.com/genzagents).