CLI Commands
The helpbase CLI provides four commands for managing your help center content.
generate
Generate help center articles from a source URL:
npx helpbase generate --url https://your-product.com
| Flag | Description | Default |
|---|---|---|
--url <url> | Source URL to scrape | required |
--output <dir> | Output directory | content/ |
--screenshots <dir> | Screenshot folder for visual articles | - |
--title <title> | Article title (with --screenshots) | - |
Combine --url and --screenshots to generate visual how-to articles that include both scraped context and annotated screenshots.
audit
Validate all content in your help center:
npx helpbase audit
Checks for:
- Valid frontmatter (title, description, schemaVersion)
- Category metadata (
_category.jsonin each category folder) - Empty categories (categories with no articles)
- Missing content directory
| Flag | Description |
|---|---|
--format json | Output as JSON for CI integration |
Run helpbase audit in your CI pipeline to catch content issues before they ship. Exit code 1 means validation failed.
new
Scaffold a new article from a template:
npx helpbase new getting-started/quickstart --template how-to
Available templates:
how-to(default) — Step-by-step guide with Steps componenttroubleshooting— Problem/solution format with Callout and Accordionreference— API or component reference with tables
The command creates the MDX file with frontmatter and the appropriate MDX components pre-filled.
deploy
Deploy your help center to helpbase cloud:
The hosted deploy feature is in beta. Magic link authentication and content sync work, but image upload and ISR revalidation are still being finalized.
npx helpbase deploy
Authenticate
First run prompts for your email. A magic link is sent via Supabase Auth. After clicking the link, your session is cached at ~/.helpbase/auth.json.
Choose a subdomain
Pick your subdomain slug (e.g., my-product). The CLI checks availability and reserves it.
Upload content
All MDX articles and category metadata are validated and uploaded to Supabase. Your help center goes live at my-product.helpbase.dev.
Subsequent deploys skip authentication (cached) and subdomain selection (already reserved). Just run helpbase deploy to push content updates.