CLI Overview
The Capyseo CLI provides commands for analyzing sites, generating SEO assets, and watching for changes.
Installation
# Global install
npm install -g @capyseo/cli
bun add -g @capyseo/cli
# Or run directly
npx @capyseo/cli <command>
bunx @capyseo/cli <command>
Commands
| Command |
Description |
analyze <target> |
Analyze a directory or URL for SEO issues |
generate sitemap |
Generate sitemap.xml from a site |
generate robots |
Generate robots.txt file |
generate meta |
Generate meta tags with AI |
init |
Create a configuration file |
watch <dir> |
Watch for changes and analyze in real-time |
Global Options
capyseo --version # Show version
capyseo --help # Show help
capyseo <cmd> --help # Show command help
Quick Reference
# Analyze a built site
capyseo analyze ./dist
# Analyze with AI suggestions
capyseo analyze ./dist --ai
# Analyze a live URL
capyseo analyze https://example.com
# CI mode with minimum score
capyseo analyze ./dist --ci --min-score 80
# JSON output
capyseo analyze ./dist --format json -o report.json
# Generate sitemap
capyseo generate sitemap ./dist --origin https://example.com
# Generate robots.txt
capyseo generate robots --sitemap https://example.com/sitemap.xml
# Initialize config
capyseo init
# Watch mode
capyseo watch ./src --ai
Exit Codes
| Code |
Meaning |
0 |
Success |
1 |
Analysis failed |
2 |
Validation error |
3 |
File error |
4 |
Network error |
5 |
Config error |
10 |
Score below minimum (CI mode) |
Environment Variables
| Variable |
Used For |
GEMINI_API_KEY |
Gemini AI features |
OPENAI_API_KEY |
OpenAI features |
ANTHROPIC_API_KEY |
Anthropic features |
Command Details
- analyze - Full analysis command reference
- generate - Generate sitemap, robots, meta
- init - Configuration initialization
- watch - Real-time analysis