The SEOgent CLI offers a command-line tool for running SEO scans and retrieving results from SEOgent. It's designed for both developers and AI agents.
Quick start for AI coding agents: Download the SEOgent SEO Skill to give your AI agent built-in SEO scanning capabilities — no manual setup required.
Before using the CLI, you need an API token to authenticate your requests.
/settings/api-tokens)Keep your token secure. Treat it like a password.
Install the CLI globally via npm:
npm install -g seogent
Requires Node.js 18 or higher.
Choose one of three ways to provide your API token:
seogent auth <your-api-token>
This stores your token in ~/.seogent/config.json with restricted file permissions.
export SEOGENT_API_KEY=<your-api-token>
seogent scan https://example.com --api-key <your-api-token>
If multiple methods are set, the priority order is: --api-key flag > environment variable > config file.
Start a scan on any URL:
seogent scan https://example.com
This returns a scan ID and exits immediately:
{
"scan_id": "abc123",
"status": "pending"
}
seogent scan https://example.com --max-pages 50
Add --performance to measure Largest Contentful Paint, Cumulative Layout Shift, Interaction to Next Paint, and other Core Web Vitals for every page scanned. Uses additional credits per page.
seogent scan https://example.com --performance
Add --link-check to verify that every internal link and image on each page resolves successfully. Pages with broken links or missing images will be flagged in the results.
seogent scan https://example.com --link-check
You can combine both flags:
seogent scan https://example.com --performance --link-check
seogent status <scan_id>
Returns:
{
"scan_id": "abc123",
"status": "processing",
"progress": 45,
"url": "https://example.com",
"created_at": "2026-02-17T12:00:00Z"
}
seogent results <scan_id>
seogent results <scan_id> --section meta
seogent results <scan_id> --issues-only
seogent results <scan_id> --issues-only --min-severity high
seogent credits
All commands output JSON to stdout, making them easy to compose with other tools:
# Extract issues with jq
seogent results abc123 | jq '.issues'
# Save results to a file
seogent results <scan_id> > results.json
Progress messages are sent to stderr so they don't interfere with JSON output. Use --quiet to suppress them entirely.
| Command | Description |
|---|---|
seogent auth <key> |
Save your API token |
seogent auth --show |
Show the saved token (masked) |
seogent auth --remove |
Remove the saved token |
seogent scan <url> |
Start a scan (see scan flags below) |
seogent status <scan_id> |
Check scan progress |
seogent results <scan_id> |
Get scan results |
seogent credits |
Check credit balance |
| Flag | Description |
|---|---|
--urls <url> |
Additional URLs to scan (repeatable) |
--mode <mode> |
Crawl mode: discover (default) or manual |
--max-pages <n> |
Maximum pages to scan (up to 10,000) |
--performance |
Include Core Web Vitals metrics |
--link-check |
Check for dead links and broken images |
--webhook <url> |
URL to POST results to when scan completes |
| Flag | Description |
|---|---|
--api-key <key> |
Override API token for this command |
--quiet |
Suppress all non-JSON output |
--help |
Show help for any command |
You can manage your API tokens at any time from the SEOgent dashboard:
Navigate to Settings > API Tokens to manage your tokens.
| Code | Meaning |
|---|---|
0 |
Success |
1 |
General error |
2 |
Authentication error (missing or invalid token) |
3 |
Scan not found |
4 |
Rate limit exceeded |
Want to get started even faster? Download the SEOgent SEO Skill — a ready-made skill package that lets AI coding agents like Claude Code run SEO scans directly. Just drop it into your project and your agent can start scanning.