cd /news/generative-engine-optimization/show-hn-a-cli-that-measures-whether-… · home › topics › generative-engine-optimization › article
[ARTICLE · art-177498] src=github.com ↗ pub= topic=generative-engine-optimization verified=true sentiment=· neutral

Show HN: A CLI that measures whether AI answers cite your site

An open-source Go-based command-line tool called AI Citation Monitor (aicm), version 0.2.0, was released to measure whether AI-generated answers cite a given website, running a versioned set of questions against search-enabled AI APIs and storing citation evidence in SQLite. The tool extracts citations from provider response metadata rather than guessing URLs from answer text, and reports brand mentions, per-question citation rates, competitor comparisons and daily, weekly or monthly trends, with JSON output, stable exit codes and CSV/JSON/JSONL exports. Its authors state the results are sample-based observations of the configured questions, providers, models, stages and runs, not overall AI search rankings, and require that disclaimer in generated reports.

key takeaway

aicm 0.2.0 runs a versioned question set against search-enabled AI APIs and extracts citations from provider response metadata rather than URLs guessed from answer text, storing question versions, model and API conditions, timestamps and answer hashes in SQLite for reproducible GEO/AEO tracking.

read9 min views1 publishedNov 27, 2026
Show HN: A CLI that measures whether AI answers cite your site
Image: Michielbdejong (auto-discovered)

Measure how often AI-generated answers cite your website—reproducibly, from the command line.

<sub>The image is an illustration; the numbers in it are not a measurement.</sub>

AI Citation Monitor is an open-source, Go-based CLI for measuring GEO (Generative Engine Optimization) and AEO (Answer Engine Optimization) outcomes. It runs a versioned set of questions against search-enabled AI APIs, stores citation evidence in SQLite, and reports visibility, competitor comparisons, and changes over time.

日本語 · CLI reference · Metrics · Providers

Important

These are sample-based observations, not overall AI search rankings. Results describe the configured questions, providers, models, stages, and runs only. They do not represent every user's ChatGPT, Gemini, or Claude experience. The same disclaimer is mandatory in generated reports.

Traditional SEO analytics cannot directly tell you whether a particular AI answer cited your website. aicm makes that question testable and auditable:

  • Evidence-based citation tracking: extract citations from provider response metadata, not URLs guessed from answer text.
  • Brand and question visibility: track brand mentions, per-question citation rates, and question coverage.
  • Competitor comparisons: measure competing domains under the same test conditions.
  • Historical trends: compare periods and display daily, weekly, or monthly changes.
  • Reproducibility: preserve question versions, model and API conditions, timestamps, answer hashes, and—when enabled—raw responses.
  • Automation-friendly CLI: JSON output, stable exit codes, and CSV/JSON/JSONL exports; no web UI or hosted account required.

aicm is one static binary — no C compiler, no runtime dependency — for macOS and Linux on amd64 and arm64, and for Windows on amd64.

Download the archive for your platform from the latest release, together with the checksums.txt published beside it:

Platform Archive
macOS, Apple silicon ai-citation-monitor_<version>_darwin_arm64.tar.gz
macOS, Intel ai-citation-monitor_<version>_darwin_amd64.tar.gz
Linux, x86-64 ai-citation-monitor_<version>_linux_amd64.tar.gz
Linux, arm64 ai-citation-monitor_<version>_linux_arm64.tar.gz
Windows, x86-64 ai-citation-monitor_<version>_windows_amd64.zip

Check the archive against the published checksum before running it:

VERSION=0.2.0                                       # the release you downloaded
ARCHIVE=ai-citation-monitor_${VERSION}_darwin_arm64.tar.gz   # your platform

grep "$ARCHIVE" checksums.txt | shasum -a 256 -c -  # Linux: ... | sha256sum -c -
tar xzf "$ARCHIVE"
mkdir -p ~/.local/bin && install -m 0755 aicm ~/.local/bin/aicm   # or: sudo install -m 0755 aicm /usr/local/bin/aicm
aicm version

The archive has no directory level: it holds aicm, LICENSE, the READMEs, docs/ and examples/. On Windows, compare (Get-FileHash .\ai-citation-monitor_0.2.0_windows_amd64.zip -Algorithm SHA256).Hash with the line in checksums.txt, expand the .zip, and put the folder on your PATH.

Go 1.26.11 or newer (per go.mod):

go install github.com/routeflags/ai-citation-monitor/cmd/aicm@latest

go install writes to $(go env GOBIN), or to $(go env GOPATH)/bin when GOBIN is unset; that directory has to be on your PATH.

git clone https://github.com/routeflags/ai-citation-monitor
cd ai-citation-monitor
make aicm     # ./aicm, stamped with the git version (`go build -o aicm ./cmd/aicm` also works)
make check    # gofmt, vet, build, test, race, lint, govulncheck — what CI runs

There is no Homebrew, apt/dnf, Scoop or container package yet; pick one of the three ways above.

A recorded, offline walkthrough of setup and a dry run. It does not make live API calls.

aicm init --non-interactive \
  --site-id example-shop \
  --own-domain example.shop \
  --brand-terms "Example"

aicm questions import --file examples/questions.yml

The example question set uses site_id: example-shop. For a real project, replace the sample domain, brand terms, and questions with your own and keep their versions stable between comparisons.

A question set is a small YAML file. The minimum that works:

set_version: "1.0.0"
site_id: example-shop
own_domain: example.shop
market: ja-JP
language: ja

brand_terms:
  - Example
competitors: []

questions:
  - { id: Q01, text: "What is Example?", category: definition }
  - { id: Q02, text: "How does Example compare with Rival?", category: comparison }

stages:
  smoke:
    runs_per_question: 1
    question_ids: [Q01]
  initial:
    runs_per_question: 3
    question_ids: [Q01, Q02]

aicm questions import --file questions.yml --check validates the file and writes nothing: the stage nesting (smoke ⊆ initial ⊆ regular when present), runs_per_question (1–5), and the round-trip count per stage. Drop --check to store the set; aicm questions list shows what is stored.

  • set_version is the identity of the set. Change it in the same edit that changes a question text, or a later comparison reads as a change in citations when only the wording moved.
  • category is one ofdefinition ,comparison ,regulation ,effect ,safety ,usage ,purchase ,list ,identification ,dosage .
  • competitors: [] is allowed. The import warns (I042 ) that the share table will show own / other only.
aicm run --provider openai --model YOUR_SUPPORTED_MODEL \
  --stage smoke --repeat 1 --dry-run

--dry-run does not call a provider or require an API key. The tool does not calculate a monetary quote; check provider pricing separately.

export OPENAI_API_KEY="your-api-key"

aicm run --provider openai --model YOUR_SUPPORTED_MODEL \
  --stage smoke --repeat 1 --yes

Models must be specified with --model or in aicm.toml; the tool does not guess a model. A real run calls a paid third-party API. Start with a small question set and --limit if needed. Keep API keys out of configuration files and version control.

aicm report --period 30d
aicm compare --period 30d --baseline previous
aicm trends --interval weekly --period 90d
aicm verify

Reports are written to the configured report directory (default reports/). For CSV or JSON data use aicm export.

A recorded report view, generated from saved data without live API calls. The figures shown are sample observations, not a benchmark.

A small observation on 2026-11-28, using Perplexity (openai/gpt-5.6-sol), --store hash-only, and the same conditions for both five-question sets, returned different citation counts:

  • General-knowledge questions (for example, quantum entanglement, the aurora, and olive-oil production): own-site citations 0.0% (n=0/5) .
  • Questions needing current information (for example, Tokyo's current population, Japan's prime minister, the latest stable Go release, Japan's inflation rate, and G20 membership): own-site citations 60.0% (n=3/5) .

The report also shows domain citation rates such as 60.0% (n=3/5) for the own domain and 20.0% (n=1/5) for other domains; these are figures from that exact sample, not benchmarks.

This is a single small sample, not evidence that changing a question causes more citations or that other providers and models behave the same way. A zero citation count can mean that the provider did not run web retrieval or return citation metadata; it does not necessarily mean the site was searched and rejected. Keep the question set and model fixed when comparing periods.

Metric Interpretation
GEO citation rate Share of successful answers with judgeable citation metadata that cited your domain at least once
Brand mention rate Share of successful answers containing a registered brand term
AEO per-question citation rate Citation rate calculated separately for each question
AEO question coverage Share of judgeable questions that cited your domain at least once
Competitor citation rate Share of judgeable answers citing each registered competitor domain
Citation share A domain's share of citations in the stated group and denominator
Trends Time-series measurements and changes in percentage points from the preceding bucket

Interpretation matters: every rate reports its denominator n. n = 0 means not measured, never 0% visibility. Failed calls or responses without citation observability are not silently treated as uncited answers. Rates are grouped by provider × model × stage, rather than mixed across incompatible conditions. Competitor citation rates can add up to more than 100% because an answer can cite multiple domains. For exact numerators and denominators, see metrics definitions.

Command Purpose
aicm init Initialize project configuration and SQLite storage
aicm questions add|list|import Manage and version questions
aicm run Execute, preview, and record provider calls
aicm report Generate a Markdown report
aicm compare Compare periods under recorded conditions
aicm trends Display daily, weekly, or monthly trends
aicm competitors add|list|remove Manage competitor domains
aicm export Export CSV, JSON, or JSONL
aicm verify Check stored evidence and referential integrity
aicm version Display build and provider API information

Global --json mode keeps stdout machine-readable and sends diagnostics to stderr. See the complete CLI reference for command flags, output examples, and exit codes.

Provider Integration Evidence level
OpenAI Responses API + web_search One live single-question observation on 2026-11-15 ; offline fixture tests
Google Gemini generateContent +google_search One live single-question observation on 2026-11-15 ; offline fixture tests
Anthropic Claude Messages API + web_search_20250305 One live single-question observation on 2026-11-15 ; offline fixture tests
Perplexity Agent API + web_search One live single-question observation on 2026-11-28 ; offline fixture tests
xAI Grok Responses API + web_search One live single-question observation on 2026-11-28 ; offline fixture tests

These observations verify specific response shapes, not universal model support or a completed production measurement. A full live question-set study has not been performed. Tests also cover citation extraction, retry behavior, rate limits, concurrent calls, and interruption/resume behavior. See provider details.

  • Local-first: SQLite is the source of truth; no hosted backend or external database is required.
  • Evidence retention: full mode stores answer text and provider JSON for later inspection, with credential redaction. Useaicm run --store hash-only orstore_answer_body = false to omit those bodies; it preserves aggregate metrics but limits later reinspection.
  • Resumable: previously recorded question/provider/model/repeat/stage/session conditions are skipped on rerun. This includes recorded failures; use anew --session after fixing a failure if you want to retry it.
  • Explicit spending: interactive runs require confirmation; non-interactive real runs require--yes . Retries at the HTTP level may still incur provider charges.
  • No ranking promises: citation rates depend on question selection, geography/language settings, provider behavior, model versions, and the observation period.

Phase 1 is a CLI-only tool supporting OpenAI, Gemini, Anthropic, Perplexity, and Grok. It does not include a web UI, server, or scheduler.

This column outlines the principles that guide how we engage with OSS. These principles are the reason we continue our day-to-day OSS activities and writing. It reframes long-unreviewed social structures as a form of technical debt. We would be glad if you take a look.

Apache License 2.0. See LICENSE.

── more in #generative-engine-optimization 4 stories · sorted by recency
── more on @ai citation monitor 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-a-cli-that-m…] indexed:0 read:9min 2026-11-27 · —