@rankcli/agent-runtime
v0.0.13
Published
RankCLI agent runtime - executes SEO audits and fixes with AI
Readme
@rankcli/agent-runtime
Core SEO engine for RankCLI. 280+ checks, 7 deep analyzers, framework-specific fix generation.
Features
🤖 GEO (Generative Engine Optimization)
First SEO engine with AI search optimization:
- AI crawler detection (GPTBot, ClaudeBot, PerplexityBot, etc.)
- JS rendering analysis for AI crawlers
- LLM-friendliness scoring
- Citation readiness analysis
📊 7 Deep Analyzers
import { analyzers } from '@rankcli/agent-runtime';
// Comprehensive analysis
const result = await analyzers.analyzeComprehensive(html, url);
// Individual analyzers
const geo = await analyzers.analyzeGEO(html, url, robotsTxt);
const cwv = analyzers.analyzeCoreWebVitals(html, url);
const security = analyzers.analyzeSecurityHeaders(headers, url);
const schema = analyzers.analyzeStructuredData(html, url);
const images = analyzers.analyzeImages(html, url);
const links = analyzers.analyzeInternalLinking(html, url);
const mobile = analyzers.analyzeMobileSEO(html, url);| Analyzer | Checks | |----------|--------| | GEO | AI crawler access, robots.txt, SSR detection, LLM signals | | Core Web Vitals | LCP, CLS, INP, TTFB estimation | | Security | HTTPS, HSTS, CSP, grades A+ to F | | Structured Data | JSON-LD validation, rich results | | Images | Alt text, dimensions, formats, lazy loading | | Internal Links | Anchor text, orphan detection | | Mobile | Viewport, touch targets, PWA |
🔧 Framework-Specific Fixes
Auto-generate SEO fixes for 25+ frameworks:
import { generateFrameworkFix } from '@rankcli/agent-runtime';
const fix = generateFrameworkFix({
framework: 'nextjs-app',
issue: { code: 'MISSING_TITLE', ... },
siteMeta: { title: 'My Site', description: '...' }
});Supported:
- React, Next.js, Vue, Nuxt, Angular, Svelte, SvelteKit, Astro, Remix, Gatsby, Solid.js, Qwik
- Rails, Django, Laravel, Spring Boot, ASP.NET Core, Phoenix, Go
- Hugo, Jekyll, Eleventy, Pelican
- HTMX, Hotwire/Turbo
Architecture
Isomorphic engine - works in Node.js, Deno, and WASM:
src/
├── analyzers/ # 7 deep analyzers (GEO, CWV, etc.)
├── audit/ # 280+ individual checks
├── fixer/ # Framework-specific fix generation
├── frameworks/ # Framework detection
├── content/ # Content analysis
├── geo/ # GEO tracking
├── git/ # PR/commit helpers
└── index.tsInstallation
pnpm add @rankcli/agent-runtimeUsage
Full Audit
import { runAudit, generateFixes } from '@rankcli/agent-runtime';
const audit = await runAudit({
url: 'https://example.com',
maxPages: 5,
options: { geo: true }
});
const fixes = await generateFixes(audit.issues);Generate AI-Friendly robots.txt
import { analyzers } from '@rankcli/agent-runtime';
const robotsTxt = analyzers.generateAIFriendlyRobotsTxt('https://example.com');Generate Schema Templates
import { analyzers } from '@rankcli/agent-runtime';
const schema = analyzers.generateSchemaTemplate('article', {
siteName: 'My Blog',
siteUrl: 'https://myblog.com',
authorName: 'John Doe'
});Development
pnpm install
pnpm dev # Watch mode
pnpm test # Run tests
pnpm build # Build Node.js + DenoRelated
- @rankcli/cli - Command-line interface
- @rankcli/mcp-server - MCP server for AI assistants
- rankcli.dev - Documentation
License
MIT
