Docs
The AIMentionTracker CLI
How often ChatGPT, Claude, Gemini, Perplexity and Google's AI surfaces name your brand, read from a terminal. No install, no dependencies, JSON the moment you pipe it.
Card required, nothing charged for 7 days
Two commands to first output
npx @aimentiontracker/cli login --key amt_live_...
npx @aimentiontracker/cli visibility --days 30Mint the key at API keys in the app — Owner and Admin roles only, shown once. Everything after that is reading. Zero runtime dependencies, and the source is MIT: read it on GitHub before you npx it.
The binary is amt, so an install makes the same commands shorter:
npm i -g @aimentiontracker/cli
amt visibility --days 30Brand: Posteverywhere Window: 30 days
PER ENGINE (never averaged — they disagree)
ChatGPT 0.0% (0 of 14)
Claude 0 of 4 (below 5, no % yet)
Gemini 0.0% (0 of 14)
Perplexity 0.0% (0 of 14)
Google AI Overview 0.0% (0 of 12)
Google AI Mode 0.0% (0 of 14)
PER BRAND
Buffer 95.8% (69 of 72)
Later 86.1% (62 of 72)
Hootsuite 77.8% (56 of 72)
Metricool 68.1% (49 of 72)
Sprout Social 45.8% (33 of 72)
Publer 33.3% (24 of 72)
Ayrshare 0.0% (0 of 72)
Posteverywhere (you) 0.0% (0 of 72)Every command in the AI visibility CLI
Nine of them. Seven read, two manage the key.
| Command | What it answers |
|---|---|
| amt login --key amt_live_... | Stores the key at ~/.aimentiontracker/config.json, mode 0600. |
| amt logout | Removes the stored key. |
| amt whoami | Does this key work, what plan, what quota, and which reporting thresholds are in force. |
| amt brands | Which brands this key can read, and their ids. |
| amt visibility [--days 7] | How often each engine named you, and how your competitors did. |
| amt answers [--limit 50] | The stored answers themselves, with mentions and citations. |
| amt sources [--days 30] | Which domains the engines read before answering. |
| amt alerts [--limit 50] | Findings, newest first. |
| amt export | Every answer as JSON, auto-paginated, for a spreadsheet or a pipeline. |
Start with amt whoami. It proves the key works, names the plan, shows what is left of your quota, and prints the reporting thresholds currently in force — which is what you want before you read a number off anything else.
Flags
--brand <id>— Required when the organisation has more than one brand. Ignored by a pinned key.--json— Force JSON. Already the default when stdout is not a terminal, so a pipe needs no flag.
When your organisation has more than one brand, --brand is required rather than defaulted. That is the same refusal the API makes, for the same reason: a silent default files one client's numbers under another's.
Environment variables
AMT_API_KEY— Takes precedence over the saved config, always. This is the one to use in CI.AMT_BRAND— Default brand id, so --brand can be left off.AMT_BASE_URL— Override the API base. For our own testing more than yours.
The saved config lives at ~/.aimentiontracker/config.json, mode 0600. Prefer AMT_API_KEY anywhere the machine is shared or automated: it wins over the file unconditionally, so a CI job never depends on a login having happened on that runner.
In a scheduled job
The shape most people end up with.
name: AI visibility
on:
schedule: [{ cron: "0 8 * * 1" }] # Monday, 08:00 UTC
jobs:
read:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with: { node-version: 20 }
- run: npx @aimentiontracker/cli whoami
env: { AMT_API_KEY: ${{ secrets.AMT_API_KEY }} }
- run: npx @aimentiontracker/cli visibility --days 7 > visibility.json
env: { AMT_API_KEY: ${{ secrets.AMT_API_KEY }} }
- uses: actions/upload-artifact@v4
with: { name: visibility, path: visibility.json }No --json anywhere: output is JSON whenever stdout is not a terminal, so a redirect or a pipe already gets machine-readable output and a human at a keyboard still gets a table.
Run whoami first in CI as well. A job that fails on a revoked key in its first step is far easier to read than one that fails three steps later while parsing an error envelope it expected to be data.
What the CLI will not do
- No
--summary. There is no single visibility score and adding a flag that invents one would make the tool argue with its own documentation. - No writes. No flag adds a prompt or triggers a run. Both spend money, and neither should happen because a script had an argument wrong.
- No runtime dependencies. A tool people run with
npxis a supply-chain surface. Node 20 has HTTP, JSON and argument parsing; that is the whole requirement. - No percentage below the sample floor. It prints the fraction instead, because quoting a percentage off four answers is false precision.
The rules the CLI follows
Three rules the CLI will not break for you
These are not style preferences. Breaking them produces a confidently wrong report in your customer's name.
- 1
A null rate means "not enough answers yet". It is NOT zero.
Rates come back as {present, responses, rate, min_sample}. When rate is null, the sample is below the floor. Say “3 of 4 answers, too few to quote a percentage”. Never render it as 0%, and never let it into an average. Reporting “0% visibility” for a brand that was named in 3 of 4 answers is the single most damaging thing you can do with this data.
- 2
Never average the engines.
There is no single visibility score and you must not compute one. ChatGPT, Perplexity and Google AI Overviews are different surfaces that disagree, so a mean describes nothing real. Report per engine. If the user insists on one number, give them the pooled counts (present and responses summed) and say plainly what you did.
- 3
An empty alerts list does NOT mean nothing changed.
A finding is raised only when both comparison windows carry enough answers AND the move is larger than its own margin of error. On a small plan that excludes most real movement. Say “no change large enough to distinguish from noise at this sample size”. GET /me shows the thresholds in force.
The long version is on how to read our numbers. If you are wiring this into an AI assistant rather than a shell, the MCP server carries the same rules in its tool payloads.
Questions about the CLI
Answered from the implementation.
Does AIMentionTracker have a command-line tool?
How do I use the AIMentionTracker CLI in CI?
Where does the CLI store my API key?
Is there a flag to get one overall visibility score?
Why does the CLI print a fraction instead of a percentage sometimes?
Can the CLI change anything in my account?
7-day trial
The terminal reads what AIMentionTracker collects
Add your brand and the prompts your buyers type. The first answers are readable in full within minutes, from the app or from a shell.
Card required, nothing charged for 7 days.
On every plan
- Every answer stored in full, with its citations.
- Every rate shown with the number of checks behind it.
- Cited-but-not-named reported as its own state.