The ultimate agent first open-source AEO monitoring tool
10K+
Open-source AEO monitoring for your domain. Canonry tracks how AI answer engines (ChatGPT, Gemini, Claude, and others) cite or omit your website for the keywords you care about.
AEO (Answer Engine Optimization) is the practice of ensuring your content is accurately represented in AI-generated answers. As search shifts from links to synthesized responses, monitoring your visibility across answer engines is essential.

npm install -g @ainyc/canonry
canonry init
canonry serve
Open http://localhost:4100 to access the web dashboard.
For CI or agent workflows, initialize non-interactively:
canonry init --gemini-key <key> --openai-key <key>
# or via environment variables:
GEMINI_API_KEY=... OPENAI_API_KEY=... canonry init
All commands support --format json for machine-readable output.
canonry init [--force] # Initialize config and database (interactive)
canonry init --gemini-key <key> # Initialize non-interactively (flags or env vars)
canonry bootstrap [--force] # Bootstrap config/database from env vars only
canonry serve [--port 4100] # Start server in foreground (API + web dashboard)
canonry start [--port 4100] # Start server as a background daemon
canonry stop # Stop the background daemon
canonry settings # View active provider and quota settings
Non-interactive init flags: --gemini-key, --openai-key, --claude-key, --local-url, --local-model, --local-key. Falls back to GEMINI_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, LOCAL_BASE_URL, LOCAL_MODEL, LOCAL_API_KEY env vars.
canonry project create <name> --domain <domain> --country US --language en
canonry project list
canonry project show <name>
canonry project delete <name>
canonry keyword add <project> "keyword one" "keyword two"
canonry keyword list <project>
canonry keyword import <project> <file.csv>
canonry keyword generate <project> --provider gemini [--count 10] [--save]
canonry competitor add <project> competitor1.com competitor2.com
canonry competitor list <project>
canonry run <project> # Run all configured providers
canonry run <project> --provider gemini # Run a single provider
canonry run <project> --wait # Trigger and wait for completion
canonry run --all # Trigger runs for all projects
canonry run show <id> # Show run details and snapshots
canonry runs <project> # List past runs
canonry status <project> # Current visibility summary
canonry evidence <project> # View citation evidence
canonry history <project> # Per-keyword citation timeline
canonry export <project> # Export project as YAML
canonry apply canonry.yaml # Single project
canonry apply projects/*.yaml # Multiple files
canonry apply multi-projects.yaml # Multi-doc YAML (---separated)
canonry schedule set <project> --preset daily # Use a preset
canonry schedule set <project> --cron "0 8 * * *" # Use a cron expression
canonry schedule set <project> --preset daily --provider gemini openai
canonry schedule show <project>
canonry schedule enable <project>
canonry schedule disable <project>
canonry schedule remove <project>
canonry notify add <project> --webhook https://hooks.slack.com/... --events run.completed,citation.changed
canonry notify list <project>
canonry notify remove <project> <id>
canonry notify test <project> <id>
canonry notify events # List available event types
Schedule presets: daily, weekly, twice-daily, daily@HH, weekly@DAY.
canonry settings # Show all providers and quotas
canonry settings provider gemini --api-key <key>
canonry settings provider local --base-url http://localhost:11434/v1 --model llama3
canonry settings provider openai --api-key <key> --max-per-day 1000 --max-per-minute 20
Quota flags: --max-concurrent, --max-per-minute, --max-per-day.
canonry telemetry status # Show telemetry status
canonry telemetry enable # Enable anonymous telemetry
canonry telemetry disable # Disable anonymous telemetry
Telemetry is automatically disabled when CANONRY_TELEMETRY_DISABLED=1, DO_NOT_TRACK=1, or a CI environment is detected.
Define your monitoring projects in version-controlled YAML files:
apiVersion: canonry/v1
kind: Project
metadata:
name: my-project
spec:
displayName: My Project
canonicalDomain: example.com
country: US
language: en
keywords:
- best dental implants near me
- emergency dentist open now
competitors:
- competitor.com
providers:
- gemini
- openai
- claude
- local
Apply with the CLI or the API. Multiple projects can live in one file separated by ---, or pass multiple files:
canonry apply canonry.yaml
canonry apply project-a.yaml project-b.yaml
curl -X POST http://localhost:4100/api/v1/apply \
-H "Authorization: Bearer cnry_..." \
-H "Content-Type: application/yaml" \
--data-binary @canonry.yaml
The database is authoritative. Config files are input, not state.
Canonry queries multiple AI answer engines. Configure the providers you want during canonry init, or add them later via the settings page or API.
Get an API key from Google AI Studio.
Get an API key from platform.openai.com.
Get an API key from console.anthropic.com.
Any OpenAI-compatible endpoint works -- Ollama, LM Studio, llama.cpp, vLLM, and similar tools. Configure via canonry init, the settings page, or the CLI:
canonry settings provider local --base-url http://localhost:11434/v1
canonry settings provider local --base-url http://localhost:11434/v1 --model llama3
The base URL is the only required field. API key is optional (most local servers don't need one).
Note: Unless your local model has web search capabilities, responses will be based solely on its training data. Cloud providers (Gemini, OpenAI, Claude) use live web search to ground their answers, which produces more accurate citation results. Local LLMs are best used for comparing how different models perceive your brand without real-time search context.
All endpoints are served under /api/v1/. Authenticate with a bearer token:
Authorization: Bearer cnry_...
Key endpoints:
| Method | Path | Description |
|---|---|---|
PUT | /api/v1/projects/{name} | Create or update a project |
POST | /api/v1/projects/{name}/runs | Trigger a visibility sweep |
GET | /api/v1/projects/{name}/timeline | Per-keyword citation history |
GET | /api/v1/projects/{name}/snapshots/diff | Compare two runs |
POST | /api/v1/apply | Config-as-code apply |
GET | /api/v1/openapi.json | OpenAPI spec (no auth required) |
The bundled web dashboard provides five views:
Access it at http://localhost:4100 after running canonry serve.
better-sqlite3 native bindings (only needed if prebuilt binaries aren't available for your platform)Canonry uses better-sqlite3 for its embedded database. Prebuilt binaries are downloaded automatically for most platforms, but if npm install fails with a node-gyp error, you need to install build tools:
macOS:
xcode-select --install
Debian / Ubuntu:
sudo apt-get install -y python3 make g++
Alpine Linux (Docker):
apk add --no-cache python3 make g++ gcc musl-dev
Windows:
npm install -g windows-build-tools
If you're running in a minimal Docker image or CI environment without these tools, the install will fail. See the better-sqlite3 troubleshooting guide for additional help.
git clone https://github.com/ainyc/canonry.git
cd canonry
pnpm install
pnpm run typecheck
pnpm run test
pnpm run lint
pnpm run dev:web # Run SPA in dev mode
Canonry currently deploys as a single Node.js service with a SQLite file on persistent disk.
The repo includes a production Dockerfile and entry script. The default container entrypoint runs canonry bootstrap and then canonry serve.
docker build -t canonry .
docker run --rm \
-p 4100:4100 \
-e PORT=4100 \
-e CANONRY_CONFIG_DIR=/data/canonry \
-e GEMINI_API_KEY=your-key \
-v canonry-data:/data \
canonry
GitHub Actions can publish the same root image to Docker Hub. Configure these repository settings first:
DOCKERHUB_USERNAMEDOCKERHUB_TOKENDOCKERHUB_REPOSITORY if you want something other than <DOCKERHUB_USERNAME>/canonry.github/workflows/ci.yml now builds and boots the container on pushes and PRs, and .github/workflows/publish.yml pushes latest plus sha-<commit> tags on main. When packages/canonry/package.json changes version, the publish workflow also pushes that semver tag and publishes the npm package.
Keep the container to a single replica and mount persistent storage at /data so SQLite and config.yaml survive restarts.
No CORS configuration is required for this Docker setup. The dashboard and API are served by the same Canonry process on the same origin. CORS only becomes relevant if you split the frontend and API onto different domains.
Use the repo root as the service root. @ainyc/canonry depends on shared workspace packages under packages/*, so deploying from a subdirectory will break the build.
Canonry runs as a single service -- the API, web dashboard, and job scheduler all run in one process. No provider API keys are required at startup; configure them later through the web dashboard.
One-click deploy:
Dockerfile automatically -- no custom build or start commands needed/data8080)Manual setup:
Dockerfile (the default)/data (right-click the service > Create Volume)Optional environment variables:
| Variable | Description |
|---|---|
GEMINI_API_KEY | Google Gemini provider key |
OPENAI_API_KEY | OpenAI provider key |
ANTHROPIC_API_KEY | Anthropic/Claude provider key |
LOCAL_BASE_URL | Local LLM endpoint (Ollama, LM Studio, etc.) |
CANONRY_API_KEY | Pin a specific API key instead of auto-generating one |
Provider keys can also be configured at any time via the Settings page in the dashboard.
Keep the service to a single replica -- SQLite does not support concurrent writers.
Create one Web Service from this repo with runtime Docker, then attach a persistent disk mounted at /data.
ENTRYPOINT./healthSQLite should live on the persistent disk, so keep the service to a single instance.
Contributions are welcome. See CONTRIBUTING.md for setup instructions.
FSL-1.1-ALv2 — Free to use, modify, and self-host. Each version converts to Apache 2.0 after two years.
Built by AI NYC
Content type
Image
Digest
sha256:4e7e99772…
Size
131.2 MB
Last updated
4 minutes ago
docker pull arberx/canonry