citable-cli 0.4.1__py3-none-any.whl
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.
- citable/__init__.py +693 -0
- citable/hosted.py +338 -0
- citable/track.py +370 -0
- citable/watch.py +293 -0
- citable_cli-0.4.1.dist-info/METADATA +201 -0
- citable_cli-0.4.1.dist-info/RECORD +10 -0
- citable_cli-0.4.1.dist-info/WHEEL +5 -0
- citable_cli-0.4.1.dist-info/entry_points.txt +2 -0
- citable_cli-0.4.1.dist-info/licenses/LICENSE +21 -0
- citable_cli-0.4.1.dist-info/top_level.txt +1 -0
|
@@ -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,10 @@
|
|
|
1
|
+
citable/__init__.py,sha256=AX2ziO0XLZnKQtaYlB7etETWFkalzJJYdPJ3yPQK4z4,34963
|
|
2
|
+
citable/hosted.py,sha256=6qyJWyQhKKqj2oeL39sAopsfij0zfkcgZNtXTb4EtUk,15861
|
|
3
|
+
citable/track.py,sha256=VkFdpBtcx78Lj509b94Fs4jq4llvUWQV5KoPIonT0ss,18123
|
|
4
|
+
citable/watch.py,sha256=dTKcx5mvtGQuRlpJHim8E7cOCwe-GbGPv5O7HRrGfCs,13193
|
|
5
|
+
citable_cli-0.4.1.dist-info/licenses/LICENSE,sha256=neuezHlSlIMyvpshhr1fpqRGeKp7Pd2DO0P4aDVkbVs,1067
|
|
6
|
+
citable_cli-0.4.1.dist-info/METADATA,sha256=UOBU0BuKR3H8dCSs8G594ZONAVWPYQjKCWtB-ni2qtA,9899
|
|
7
|
+
citable_cli-0.4.1.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
8
|
+
citable_cli-0.4.1.dist-info/entry_points.txt,sha256=fAxuy7xxLdvYaLux8UJlbP_GOWr4Dz7d90okWyPsqqA,41
|
|
9
|
+
citable_cli-0.4.1.dist-info/top_level.txt,sha256=SKQoWHt75zUtsWEgYpF9pJ9eVoqhyA38O_u7LIvRE-E,8
|
|
10
|
+
citable_cli-0.4.1.dist-info/RECORD,,
|
|
@@ -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 @@
|
|
|
1
|
+
citable
|