seo-assist
v0.1.1
Published
CLI tool for automatic SEO setup in web projects with AI-powered meta tags, robots.txt and sitemap generation
Maintainers
Readme
seo-assist
CLI tool for automatic SEO setup in web projects: AI-powered meta tag generation, robots.txt with AI bot blocking, and sitemap.xml.
Installation
npx seo-assist initOr install globally:
npm install -g seo-assistQuick start
# 1. Initialize configuration
npx seo-assist init
# 2. Generate SEO files
npx seo-assist generate
# 3. Validate the result
npx seo-assist validateCommands
init
Creates seo.config.json in the project root. Interactively asks for:
- Site type (e-commerce, blog, portfolio, landing page)
- Primary domain
- Language
- Whether to block AI crawlers (default: yes)
generate
The main command. It:
- robots.txt — writes to
public/(orstatic/), blocks AI bots whenblockAiBots: true - sitemap.xml — scans routes from config and the file system
- AI meta tags — via the OpenRouter API, saved to
seo-meta.json - Code integration — Next.js (Metadata API), React (
SEO.tsx), Vite (index.html)
Creates a .bak backup before modifying any files.
validate
Checks for robots.txt, sitemap.xml, meta tags, and prints a report.
OpenRouter API key
AI meta tag generation requires an API key:
- Sign up at openrouter.ai
- Get a key at openrouter.ai/keys (free up to $5)
- On the first
generaterun, the key is prompted and saved toseo.config.json
Without a key or without internet, only robots.txt and sitemap.xml are generated.
Configuration example
{
"siteType": "blog",
"domain": "https://example.com",
"language": "ru",
"blockAiBots": true,
"routes": ["/", "/about", "/contact", "/blog/*"],
"aiProvider": "openrouter",
"aiModel": "gpt-3.5-turbo"
}Supported frameworks
| Framework | Detection | Integration |
|-----------|-----------|-------------|
| Next.js | next.config.* | app/layout.tsx — Metadata API |
| Vite | vite.config.* | index.html |
| React | src/index.html | src/components/SEO.tsx |
Development
git clone https://github.com/AVPletnev/seo-assist.git
cd seo-assist
npm install
npm run build
# Quick demo test with a Next.js blog example (no API key needed)
npm run test:demo
# Or run manually
node bin/index.js init
node bin/index.js generate
node bin/index.js validateDemo project: examples/next-blog/ — a minimal Next.js App Router setup with a ready-made seo.config.json.
Publishing to npm (maintainers)
# 1. Check package contents
npm run publish:dry-run
# 2. Log in (if not already)
npm login
# 3. Publish (prepublishOnly: build + test:demo)
npm publish
# Verify after publishing
npx seo-assist@latest --versionLicense
MIT — see LICENSE
