Run your SEO findings from the terminal, or let an AI coding agent like Claude Code run them for you. Roborank stays the system of record; this is the front door.
npm install -g roborank
Node 18 or newer. The package has zero dependencies, makes no AI calls of its own, and commands return in under a second.
rbk_ and is shown once, so copy itroborank login --token rbk_yourtoken
roborank whoami
whoami shows which server you are connected to and the sites your token can reach. The token is stored in ~/.roborank/config.json with owner-only permissions. Agents and CI can skip login and set ROBORANK_TOKEN in the environment instead.
Anyone with the token has its full access to your sites. If one leaks, revoke it from the same Settings page.
roborank sites # all connected sites, sync freshness
roborank overview --site example.com # health snapshot, 28-day trend
roborank quick-wins --site example.com # small fixes that win real clicks
roborank cannibalization --site example.com
roborank decay --site example.com # pages losing traffic they had
roborank links --site example.com # under-linked pages
roborank top-pages --site example.com
roborank competitors --site example.com
roborank search --site example.com --query "pricing"
roborank page --site example.com --url https://example.com/pricing/
roborank queries --site example.com --page-url https://example.com/pricing/
queries is the honesty check: it shows the actual Google searches a page appears for. Always run it before rewriting a title, because a page that looks like a winner sometimes only ranks for your own brand name.
--site is optional when your account has one site. Output is a readable table at the terminal and JSON when piped or read by an agent; --json forces JSON anywhere.
Write commands need two toggles in the dashboard, per site: Settings → Remote Access, and inside it, allow remote edits. Until both are on, writes are refused with a message that says so.
# Rewrite a title and meta description
roborank set-meta --site example.com --url https://example.com/pricing/ \
--title "New title" --description "New description"
# Surgical find-and-replace in page content (how you add internal links)
roborank patch --site example.com --page-id 986 \
--old "better results than a throwaway mention." \
--new "better results than a throwaway mention. See the <a href="https://example.com/guide/">full guide</a>."
# Record a change you applied outside Roborank
roborank log-change --site example.com --url https://example.com/pricing/ \
--action update_meta --reason "rewrote title for CTR"
A write command queues the change and returns queued: true. Nothing touches your site until you approve it in the dashboard under Pending changes. Check the queue with roborank pending. Approval is dashboard-only by design, so an agent holding your token can never approve its own changes. Prefer direct writes? Untick "Require my approval" when enabling Remote Access.
Every applied change is verified against the live site and recorded in the changelog with before and after values. Read it back anytime with roborank changelog.
Match on text without quotes or apostrophes when you can; WordPress converts straight quotes to curly ones at render time, so quoted phrases often fail to match the stored content. Some posts store bare text and WordPress adds the <p> tags at render, so if a match including </p> fails, retry without it. If a write complains about a missing page id, run Refetch Site in the dashboard first.
cd your-project
roborank init
init adds a Roborank section to the project's CLAUDE.md, so every Claude session in that folder checks live data instead of stale notes. Also copy skill/SKILL.md from the npm package into ~/.claude/skills/roborank/SKILL.md; it teaches the full workflow: read findings, verify against real queries, write the fix, apply it, log it.
From then on you can ask things like "what should I fix on example.com" in plain English inside Claude Code. Asking the terminal directly does not work; the shell is not an AI.
Roborank cannot write to a static site, so write commands return a patch plan instead: exact find-and-replace edits. Your agent applies them to the local files, then calls roborank log-change so the dashboard still records the work.
Any flag that is not a CLI flag becomes a tool argument: --min-impressions 50 sends min_impressions: 50. Pass raw JSON with --args-json. Every server-side tool is reachable directly, even ones newer than your installed package:
roborank tools # list everything the server offers
roborank call get_consolidation --site example.com
Exit codes tell an agent what happened: 1 the server refused, 2 usage error, 3 auth problem, 4 network trouble.
Nothing in this CLI spends AI tokens. Your AI provider key is only used when the dashboard agent writes or thinks for you; the CLI's write tools take content that is already written and apply it. Keyword lookups (roborank keywords) use your configured keyword data provider's credits and fail cleanly if none is set. When Claude Code drives the CLI, the intelligence is billed to your Claude plan, not to Roborank.
| Message | Fix |
|---|---|
Remote Access is off for this site | Dashboard → site settings → enable Remote Access and allow remote edits |
Invalid page_id "undefined" | Run Refetch Site in the dashboard so the sync captures WordPress ids |
No replacements matched | Your --old text is not in the stored content; drop quotes and closing tags, or check with roborank page |
syncs from the Roborank dashboard | WordPress sites refresh with the Refetch Site button, not from the CLI |
No keyword data provider configured | Add a provider in Settings, or skip keyword lookups |
401 or exit code 3 | Token revoked or wrong server; roborank login again |
The CLI speaks the same JSON-RPC protocol as the Roborank MCP server, against the same /mcp endpoint and the same tokens. One auth model, one tool layer: whatever the dashboard chat can do, the CLI can do, and new server-side tools are reachable through roborank call without upgrading the package.