airanks
v1.3.1
Published
AIR (airanks) CLI — AI optimization from your terminal: look up any site's AI Rank, same data as the toolbar. https://airanks.net
Downloads
313
Maintainers
Readme
⚡ airanks — AI optimization from your terminal
What does AI actually say about your site?
airlooks up any domain's AI Rank — the same live data as the AIR Toolbar — straight from your terminal. AI optimization, minus the tab-switching. 🏆
$ air stripe.com
stripe.com AIR 9/10 █████████░ · top 13%
tracked — 253 occurrences · 1 phrase · 7 brands
llms.txt ✓ llms-full ✗ ai.txt ✗ robots.txt ✓ json-ld ✓
ai crawlers: 14 partial of 14🚀 Quick start
npx airanks stripe.com # one-shot, nothing installed
npm i -g airanks && air nike.com # or keep itFirst run walks you through a 10-second sign-in (free account — the API requires one; it keeps the bulk scrapers out).
🧭 What it does
| Command | What happens |
|---|---|
| air stripe.com | 📊 AIR score, truecolor gauge, percentile, ai-files checklist, AI-crawler verdicts |
| air best running shoes | 🔎 keyword/phrase search — top domains, brands & ranked phrases |
| air brandnewsite.com | 🕐 never-seen domains are gathered on the spot (live spinner, ~1–3 min) |
| air login | 🔐 paste an API key, or browser sign-in: type a short code, click Approve, done |
| air whoami / air logout | 👤 session info · remove the local token |
Smart detection: an argument that parses as a hostname is a lookup, anything else is a
search. Force either with -d/--domain or -k/--keyword (alias -p/--phrase).
🎛 Flags & modes
| Flag | Effect |
|---|---|
| --json | machine-readable payload (stable envelope) |
| --txt | plain text — no color, no icons; also auto-selected by TERM=dumb / CI=true |
| (default) | truecolor score gauge, Nerd-Font icons, clickable links (OSC 8 terminals) |
Exit codes: 0 success · 1 error · 2 answer still gathering — re-run in a minute
(the payload is still emitted under --json).
NO_COLOR is honored (strips color, keeps glyphs). Honest output policy: counts from a
partial sample are labeled as counts, never dressed up as a ranking.
🔐 Signing in
A free account is required for lookups (anti-abuse). Two ways in:
- API key — mint at airanks.net/tokens, paste when asked
(or set
AIR_API_KEYin the environment — it always wins). - Browser pairing —
air login→ prints a short code → type it at airanks.net/cli/auth → Approve. Works from SSH boxes and containers too: no localhost server, no port games — the browser can be on any device.
sequenceDiagram
autonumber
participant CLI as 💻 air login
participant API as ☁️ airanks.net
participant B as 🌐 your browser
CLI->>API: PKCE challenge
API-->>CLI: short code · XXXX-XXXX
CLI->>CLI: prints code, opens browser, polls
B->>API: sign in, type the code, Approve
API-->>CLI: scoped token (90-day, single-claim)
CLI->>CLI: saved to ~/.config/air/auth.json (0600, host-bound)Tokens are scoped cli-ability, expire in 90 days, ride only to the host they were minted
for, and are handed over exactly once. The code must be typed, never clicked — that's the
anti-phishing design.
📦 Zero dependencies
One file, Node ≥ 18 stdlib only. No supply chain to audit but this one. The CLI keeps
itself current automatically on run (from this very package — pin a version with
npm i -g [email protected] if you prefer).
🗺 More
- 🌐 Full rankings, methodology & confidence intervals: airanks.net
- 🧰 The browser companion: AIR Toolbar
- 📈 What the score means: airanks.net/faq
Built in Dallas with an unreasonable amount of measurement. ⚡🤠
