Does AI recommend your library or dev product?
PromptBeacon asks ChatGPT, Claude, Gemini or a local model the questions your users ask,
and turns the answers into a number you can gate in CI and show as a README badge.
Use it from: CLI · your AI assistant (Claude Code, Cursor, VS Code and more) · GitHub Action · pytest · Python
Try it in 10 seconds, no API key
pip install promptbeacon
promptbeacon demo httpx --category "python http client" -c requests -c aiohttp
Real output (excerpt; the full report adds a score breakdown, cited domains and a competitor table):
Running in DEMO mode — canned data, no API calls.
╭────────────────────────── Visibility Score: httpx ───────────────────────────╮
│ 79.0 / 100 │
╰─────────────────────── Generated: 2026-11-01 20:05:52 ───────────────────────╯
measurement: demo — Demo data — canned responses, not a real measurement.
prompts: 10 · category: python http client
...
Share of Voice: 33% (rank 2, 60% of prompts)
Share of Voice
┏━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Brand ┃ Appears In ┃ Presence ┃ Share of Voice ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ requests │ 8/10 │ 80% │ 44% │
│ httpx │ 6/10 │ 60% │ 33% │
│ aiohttp │ 4/10 │ 40% │ 22% │
└──────────┴────────────┴──────────┴────────────────┘
demo runs the whole pipeline on canned answers built from your inputs, costs nothing,
and labels every result measurement: demo. For a real measurement, set an API key and
run promptbeacon scan with the same arguments.
Put the result in your README
In your project's repository, one command sets up a weekly check, previews the workflow and asks before writing anything; it works without API keys and prints the badge snippet and the next steps:
promptbeacon init --dry-run # reads pyproject.toml / package.json / Cargo.toml and the git remote
Or by hand: one scan produces a badge and a 1200×630 share card (SVG in light and dark,
and PNG for networks that need it, with pip install 'promptbeacon[share]'):
promptbeacon scan httpx -t "python http client" -c requests -c aiohttp -f json > report.json
promptbeacon badge --report report.json --endpoint .promptbeacon/badge.json
promptbeacon card --report report.json --theme both --png card.png
Both images are unedited output of the demo command above, and say so. The weekly workflow template re-scans and commits a fresh badge; see Badges & share cards.
Which tool? PromptBeacon is for developers and open-source maintainers: does AI recommend your library or dev product — a number in CI and a README badge. Saylent (npm
saylent) is for brand and website teams: an audit of what AI assistants say about your site, with the answers and cited pages as receipts, plus fixes for your site.
Real scans: keys and models
export OPENAI_API_KEY="sk-..." # or ANTHROPIC_API_KEY, GEMINI_API_KEY, ...
promptbeacon providers # which keys are set, and which model each provider uses
promptbeacon scan httpx -t "python http client" -c requests -c aiohttp -p openai -p anthropic
Keys are read from the environment or a .env file. Each provider has a low-cost default
model; choose another per provider with --model provider=model_id (repeatable), with
PROMPTBEACON_<PROVIDER>_MODEL, or with Beacon.with_models() in Python:
promptbeacon scan httpx -t "python http client" -m anthropic=claude-sonnet-5-5 -m openai=gpt-6-sol
Provider (-p) |
Default model | API key variable |
|---|---|---|
openai |
gpt-6-luna |
OPENAI_API_KEY |
anthropic |
claude-haiku-5-5 |
ANTHROPIC_API_KEY |
google |
gemini-3.5-flash-lite |
GOOGLE_API_KEY or GEMINI_API_KEY |
mistral |
mistral-small-latest |
MISTRAL_API_KEY |
cohere |
command-r7b-12-2024 |
COHERE_API_KEY |
perplexity |
sonar |
PERPLEXITY_API_KEY |
litellm |
none: any LiteLLM model you set | read by LiteLLM |
Providers you name with --model are the ones queried when you don't pass -p. Defaults
change between releases, so pin --model (or a protocol) when
you track a trend. Costs are estimated from LiteLLM's price map.
Local models (Ollama)
The litellm slot takes any LiteLLM model string, so a local model needs no API key:
ollama pull llama3.2
promptbeacon scan httpx -t "python http client" -c requests --model litellm=ollama/llama3.2
OpenRouter, Azure, Bedrock or a vLLM server work the same way, for example
--model litellm=openrouter/<model> with OPENROUTER_API_KEY set. See
Models & local LLMs.
In Python
from promptbeacon import Beacon
report = (
Beacon("httpx")
.with_category("python http client")
.with_competitors("requests", "aiohttp")
.demo() # keyless; remove for a real scan
.scan()
)
print(f"Visibility: {report.visibility_score:.0f}/100")
print(f"Share of voice: {report.share_of_voice.target_share:.0%}")
print(f"Rank: {report.share_of_voice.target_rank}")
For a real scan, drop .demo() and optionally choose models:
.with_models({"anthropic": "claude-sonnet-5-5"}) or .with_models(litellm="ollama/llama3.2").
The category is what makes a scan meaningful: prompts become real questions such as
"Which python http client would you recommend?". Without one, PromptBeacon asks "alternatives to
<competitor>" questions when you give competitors, and otherwise warns you.
.with_category_inference() (CLI: --infer-category) can name it with one model call.
Cost estimates, async scans, JSON, history and a CI script: Python API.
In CI: pytest and the GitHub Action
- uses: yotambraun/promptbeacon@v1
id: beacon
with:
brand: "httpx"
category: "python http client"
competitors: |
requests
aiohttp
models: |
openai=gpt-6-luna
min-share-of-voice: "0.3"
comment-on-pr: "true" # needs permissions: pull-requests: write
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
- run: echo "Score ${{ steps.beacon.outputs.score }}, SoV ${{ steps.beacon.outputs.share-of-voice }}"
The Action exposes score, share-of-voice, rank, presence, stability, tier,
passed and report-path, writes a job summary, and applies the thresholds last, so a
failing check still reports its numbers. Outside GitHub,
promptbeacon ci --report report.json --min-score 50 does the same.
# pytest plugin: auto-registers, and skips cleanly when no key is configured
import pytest
@pytest.mark.visibility(
brand="httpx",
categories=["python http client"],
competitors=["requests"],
models={"openai": "gpt-6-luna"},
min_score=40,
)
def test_httpx_is_visible(): ...
Or in plain code: report.assert_visibility(min_score=50, min_share_of_voice=0.3).
From your AI assistant
PromptBeacon measures; your assistant reasons about the result. Add the MCP server to Claude Code, Claude Desktop, Cursor, VS Code (GitHub Copilot), Windsurf, Codex CLI or Gemini CLI; the setup page has a tested snippet for each, and install links for Cursor and VS Code. In Claude Code:
claude mcp add --transport stdio --scope user promptbeacon -- uvx --from "promptbeacon[mcp]>=1.4.0" promptbeacon mcp
or install the plugin, which adds the server and four skills, including a full
ai-visibility-review:
/plugin marketplace add yotambraun/promptbeacon
/plugin install promptbeacon@promptbeacon
Then ask: "Does AI recommend this project? Compare it with its main alternatives, and
keep it under 5 cents." The tools (providers, estimate, scan, project_scan,
sources, compare, recommendations, history, answers, funnel, init_preview,
share_assets) return JSON, say what they cost, and accept models and max_cost.
With no key configured they use the demo and say so.
Open-source projects
promptbeacon scan --repo encode/httpx # GitHub
promptbeacon scan --pypi httpx # PyPI
promptbeacon scan --npm express # npm
promptbeacon scan --crate serde # crates.io
promptbeacon scan --hf sentence-transformers/all-MiniLM-L6-v2 # Hugging Face
PromptBeacon reads the project's public description, topics and README, guesses a category
("python http client") and the projects the README compares itself to, prints both with
where they came from, and scans with developer-oriented prompts. --category and
--competitor always win. In Python: Beacon.from_project("pypi:httpx").
Measuring it properly
- Share of voice: of all mentions of you and your competitors, how many are yours, and your rank.
- Stability: answers vary between runs.
--stability 5repeats each prompt and reports a 0–100 stability score, a confidence interval and the prompts that flip-flop. - Web-grounded answers: a plain model call reflects training memory.
--groundeduses each provider's own web search (OpenAI, Anthropic, Gemini, Perplexity) and records the pages it cites (pip install 'promptbeacon[grounded]'). - Sources:
promptbeacon sourcesranks the domains AI answers cite for your category and flags which ones cite you. - Funnel:
promptbeacon funnelmodels agentic search (fan-out, retrieve, rerank, cite) and shows the stage where you drop out. - Honest labels: every report says how it was measured (
demo,base_modelorapi_grounded), which models answered, and how complete its cost estimate is.
CLI
promptbeacon demo httpx -t "python http client" # keyless, instant
promptbeacon scan httpx -t "python http client" -c requests -p openai -p anthropic
promptbeacon scan httpx -t "python http client" -m litellm=ollama/llama3.2 # local model
promptbeacon scan --repo encode/httpx # an open-source project
promptbeacon scan httpx -t "python http client" --grounded # web-grounded answers
promptbeacon scan httpx -t "python http client" --stability 5
promptbeacon scan httpx --prompt-file questions.txt --alias python-httpx # your own questions
promptbeacon scan httpx -t "python http client" --assert-min-score 50 # CI gate
promptbeacon scan --protocol protocol.json # pinned, reproducible run
promptbeacon init --dry-run # set up a weekly workflow + badge
promptbeacon scan httpx -t "python http client" --max-cost 0.05 # cap what a scan may spend
promptbeacon badge httpx -t "python http client" --demo # README badge
promptbeacon card httpx -t "python http client" --demo --png card.png
promptbeacon ci --report report.json --min-sov 0.3 # summary + gate, any CI
promptbeacon ci --report report.json --baseline main.json --max-drop 5 # gate on a drop
promptbeacon answers --report report.json --missing httpx # the answers behind it
# also: sources, funnel, dashboard, compare, history, providers, mcp
--format accepts text, json, markdown, csv and html. Machine formats go to
stdout and notices to stderr, so promptbeacon scan ... -f json | jq works. Real CLI scans
are saved to a local DuckDB file (~/.promptbeacon/data.db) for promptbeacon history;
nothing leaves your machine except the model requests.
Also included: an HTML dashboard, smart LLM-based
extraction (--smart), and BeaconGuard, which flags chatbot replies that recommend a
competitor (Advanced).
Coming next: an AI Recommendation Index of which open-source projects AI assistants recommend, in 30 developer categories.
Who it's for
- Open-source maintainers and developer-tool teams: does ChatGPT recommend your library, and is that changing?
- Indie developers and technical founders: your product's AI visibility, in code and CI.
- AI and eval engineers: brand visibility as a check next to your other evals.
Brand, marketing and website teams auditing what assistants say about a site are better served by Saylent.
Documentation
yotambraun.github.io/promptbeacon: Quickstart · Use from AI assistants · Python API · Models & local LLMs · CLI · Open-source projects · Badges & cards · CI & examples · API reference
Contributing
Contributions are welcome. CONTRIBUTING.md covers setup
(uv sync --all-extras), tests, lint and types; TODO.md lists ideas. See
CHANGELOG.md for what changed in each release.
License
Apache License 2.0. See LICENSE.
Built with LiteLLM, Pydantic, DuckDB, Typer, Rich and the MCP Python SDK.
Metadata
Release files for promptbeacon 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| promptbeacon-1.4.0.tar.gz | 415.8 kB | With provenance | Details for promptbeacon-1.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| promptbeacon-1.4.0-py3-none-any.whl | Python 3 | none | any | Details for promptbeacon-1.4.0-py3-none-any.whl |
Total release size: 630.3 kB
Release files / promptbeacon-1.4.0.tar.gz
| Download URL | promptbeacon-1.4.0.tar.gz |
|---|---|
| Size | 415.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f07fbda385148bdbfd6cd84e2f882771b594c7b06829b02499ffadba1bf0e7ac
|
|
BLAKE2b-256 checksum How to use checksums |
14f2f6022f53085cbeafc0ffa4f8c8d018089d64fdb0aed37981f674597bf374
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logRelease files / promptbeacon-1.4.0-py3-none-any.whl
| Download URL | promptbeacon-1.4.0-py3-none-any.whl |
|---|---|
| Size | 214.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e7d02be7040b4fe919ccfd58f40bc917b0c4fa9c4e053126f098a00b114449c7
|
|
BLAKE2b-256 checksum How to use checksums |
415199c7c420e08f516b9daa14995fb8cce744af14679bf935e4aa78938936c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logSecurity for promptbeacon 1.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for promptbeacon-1.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.