
Each local area page used to take us half a day to create and optimize.
With SEOmatic, we can create hundreds of pages in the same time, which helps our clients make the best use of their budget.
It's transformed how we deliver scalable SEO solutions.
Will Hawkins
Marketing Director, Digi-Business UK
Agents read your Search Console data, do the work, and prove what actually moved. You decide what ships.
14-Day Free Trial. $1 today, credited to your first payment.
The seomatic CLI runs with no install via npx. Two commands need no account; for the rest, seomatic login signs you in from the browser. And with `tools call` it can invoke the full tool surface, the same as REST and MCP. Node 18+, zero dependencies.
Two commands need no account and no key. Copy any line and run it.
# 1. Audit any URL. No account.
npx seomatic audit https://example.com
# 2. Find crawl-budget waste in a server log. No account.
npx seomatic logs /var/log/nginx/access.log
# 3. Sign in (creates a free account if you have none), then read
# your own Search Console data.
npx seomatic login
npx seomatic gsc top-queries --days 28seomatic loginopens your browser on SEOmatic's approval screen, the same one Claude and ChatGPT use. Pick the workspace, approve, and the key comes back to the terminal. Nothing to copy from the dashboard.
~/.config/seomatic/credentials.json, readable only by you. It is valid for one year.seomatic logout revokes it.seomatic login --device shows a short code to approve from any browser, on any device (chosen automatically when there is no local browser).SEOMATIC_API_KEY to a key from Settings instead.npx seomatic login # opens the browser
npx seomatic login --device # SSH / servers: approve a code anywhere
npx seomatic me # workspace, scopes, Search Console state
npx seomatic logout # revoke and forget
# Tab completion (needs a global install: npm i -g seomatic)
seomatic completion zsh > "${fpath[1]}/_seomatic"
# CI: a key from Settings > AI Agents > API Keys
export SEOMATIC_API_KEY=smk_live_...Several client workspaces? Give each a profile: seomatic login --profile acme, then add --profile acme to any command. The key is only ever sent over https.
Key order: --key, then SEOMATIC_API_KEY, then your login.
| Command | Auth | Description |
|---|---|---|
npx seomatic audit <url> | no account | Agent-readiness + SEO surface check for any URL. |
npx seomatic logs <access.log> | no account | Crawl-budget analysis from a server access log (or - for stdin). |
npx seomatic login | free account | Sign in with your browser: approve on SEOmatic and the key comes back to the terminal. Over SSH or on a server it shows a code to approve from any browser (--device). Creates a free account if you have none. |
npx seomatic logout | free account | Revoke the saved key and remove it from this computer. |
npx seomatic me | signed in | Introspect the key: workspace, scopes, what the plan allows, GSC connection. |
npx seomatic gsc top-queries | signed in | Top Search Console queries. Flags: --days N, --limit N. |
npx seomatic gsc top-pages | signed in | Top Search Console pages. Flags: --days N, --limit N. |
npx seomatic tools | signed in | List every tool this key can call (the full surface). --group read|acts to filter. |
npx seomatic tools describe <name> | signed in | One tool's description and parameters. |
npx seomatic tools call <name> | signed in | Invoke any tool with --data '{...}', @file.json or - (stdin). Proxies POST /v1/tools/{name}, the same surface as REST and MCP. Every call carries an Idempotency-Key: retries never run an acting tool twice, and a slow tool is waited for (--wait). |
npx seomatic completion <shell> | no account | Tab completion for bash, zsh, fish or PowerShell, including tool names. Needs a global install (npm i -g seomatic). |
| Flag | Meaning |
|---|---|
--json | JSON to stdout. Works on every command. |
--key <key> | API key. Overrides SEOMATIC_API_KEY and your login. |
--profile <name> | Use a separate saved login, one per client workspace. Or env SEOMATIC_PROFILE. |
--device | login with a code you approve from any browser (automatic over SSH and on headless Linux). |
--browser | login opens a browser even over SSH. |
--wait <seconds> | How long tools call waits for a slow tool (default 300). |
--idempotency-key <k> | Collect the answer of an earlier tools call, or repeat it safely (an acting tool never runs twice). |
--no-browser | login prints the sign-in link instead of opening a browser. |
--api <base> | API base URL. Default https://app.seomatic.ai/api/v1. |
--days <n> | Lookback window for gsc commands (default 28). |
--limit <n> | Max rows for gsc commands (default 25). |
--data <json> | Body for `tools call`: inline JSON, @file.json, or - for stdin. |
--group read|acts | Filter `tools` by read-only vs acting. |
--version, -v | Print the version and exit 0. |
--help, -h | Usage and exit 0. |
seomatic audit fetches one URL and runs 10 checks (11 with a robots.txt), covering classic SEO and whether an AI answer engine can read the page.
reachabletitlemeta_descriptioncanonicalh1json_ldrobots_txtai_bots_allowedsitemapllms_txtsecurity_txt
npx seomatic audit https://example.com --json{
"url": "https://example.com",
"score": 30,
"passed": 3,
"total": 10,
"checks": [{ "id": "reachable", "ok": true, "detail": "HTTP 200 in 133ms" }]
}score is passed over total as a percentage. The command exits 0 even when checks fail, because a failing check is a finding rather than a CLI error. Branch on the score, not the exit code.
The split that matters in CI: 1 means the call was wrong, 2 means we could not complete it. Retry on 2 only.
| Code | Meaning | When |
|---|---|---|
0 | Success | Command ran. Includes an audit where checks FAILED: a failing check is a finding, not a CLI error. |
1 | Usage or API error | Unknown command or flag, missing argument, no key, 401, 403, 402 plan gate. Also bare `seomatic` with no args. |
2 | Runtime failure | Network unreachable, DNS failure, timeout, HTTP 5xx, a rate limit still hit after waiting, or a tool still running after --wait (the error carries its idempotency_key). The CLI already retries what is safe; retry on 2, fix the call on 1. |
With --json, stdout carries exactly one JSON value: the result, or on failure an error object. Progress goes to stderr. Without it, errors go to stderr.
npx seomatic audit https://example.com --json | jq .scoreBranch on code and status; error is a sentence for people and may change wording.
{
"error": "Free monthly limit reached (5 questions). Upgrade ...",
"status": 402,
"code": "FREE_QUOTA_EXCEEDED",
"upgrade_url": "https://app.seomatic.ai/..."
}Each of these is a complete, runnable snippet.
# Fail a build when a page regresses
score=$(npx seomatic audit "$URL" --json | jq -r .score)
[ "$score" -ge 80 ] || { echo "SEO score $score < 80"; exit 1; }
# List every check that failed
npx seomatic audit "$URL" --json | jq -r '.checks[] | select(.ok|not) | .id'
# Find AI crawlers wasting budget on errors
npx seomatic logs access.log --json | jq -r '.bots[] | select(.isAiBot and .wastedCrawlPct > 20)
| "(.bot) (.wastedCrawlPct)% wasted"'
# Retry only on runtime failures, never on your own bad call
for i in 1 2 3; do
npx seomatic me --json && break
[ $? -eq 2 ] || break
sleep $((i * 2))
done| Symptom | Cause | Fix |
|---|---|---|
not signed in | No login and no key. | Run seomatic login, or export SEOMATIC_API_KEY=smk_live_... |
saved sign-in is no longer valid | The key was revoked in Settings, or is a year old. | Run seomatic login again. |
Signing in on a server or over SSH | There is no browser on that machine. | seomatic login --device shows a code to approve from any browser (chosen automatically over SSH). |
TOOL_STILL_RUNNING (exit 2) | The tool ran past --wait. It was not stopped. | Run the same command with --idempotency-key <the key in the error> to collect its answer (kept 24h for acting tools, 1h for reads). |
Fails only behind a company proxy | Node ignores HTTPS_PROXY by default. | On Node 22.21+ or 24, export NODE_USE_ENV_PROXY=1. |
Missing or invalid API key | A wrong or revoked --key or SEOMATIC_API_KEY. | Check the key in Settings > AI Agents > API Keys, then run seomatic me. |
A tool is missing from `tools` | Scope, plan, or a missing connection. | seomatic me shows scopes, plan and GSC state. |
gsc returns nothing | No connected property, or the 2-3 day Google lag. | Connect Search Console, or widen --days. |
Acting tool returns a plan gate | agents:act needs the Infrastructure plan. | Upgrade, or use the read-only tools. |
logs reports 0 bots | The log has no user-agent field. | Use combined format, which ends with the quoted UA. |
Exit 2 with could not reach ... | Network, DNS, proxy, or a wrong --api. | Check connectivity; omit --api unless self-hosting. |
seomatic me --json is the fastest first report to include when asking for help.