AI Generation
helpbase can generate help center articles from any URL. Point it at your product's marketing page, docs, or README, and it produces MDX articles with proper frontmatter, headings, and component usage.
AI generation uses the Vercel AI SDK with configurable providers. The default model is Gemini Flash Lite for fast, cost-effective generation.
Basic usage
npx helpbase generate --url https://your-product.com
This scrapes the page content and generates MDX articles in your content/ directory.
How it works
Scrape the source URL
The CLI fetches the page content, strips navigation and boilerplate, and extracts the meaningful text.
Generate structured articles
The AI model receives the extracted content along with a tuned prompt that enforces:
- Proper frontmatter (title, description, tags)
- At least 3 markdown headings per article
- Minimum 150 words per article
- MDX component usage (Callout, Steps, CardGroup)
Write to content/
Generated articles are written to your content/ directory with proper category organization and _category.json files.
Options
| Flag | Description |
|---|---|
--url <url> | Source URL to generate from |
--output <dir> | Output directory (default: content/) |
--screenshots <dir> | Screenshot folder for visual how-to articles |
--title <title> | Article title (used with --screenshots) |
Visual how-to articles
For step-by-step tutorials with screenshots, use the --screenshots flag:
npx helpbase generate --screenshots ./screenshots --title "Setting up SSO"
The CLI reads images from the folder, sends them to a vision model, and generates a visual walkthrough article with <Figure> components for each screenshot.
Take screenshots in the order of the workflow. The AI infers the logical sequence from the image content, but sequential filenames help.
Prompt tuning
The generation prompt is versioned and tuned for help center content. Current version: v0.0.3. Key rules the prompt enforces:
- No marketing language ("streamline", "revolutionize", "cutting-edge")
- Concrete examples over abstract descriptions
- Code blocks for CLI commands and configuration
- MDX components where they add value (not decoration)
After generating
Always review and edit generated articles. The AI gets the structure right, but you know your product best. Common edits:
- Fix technical inaccuracies
- Add product-specific details the scraper missed
- Insert relevant MDX components (Accordion for FAQs, Tabs for multi-platform instructions)
- Run
npx helpbase auditto validate frontmatter and structure