Install CLI
Install the contento CLI and configure your AI provider in under a minute.
Prerequisites
| Dependency | Version | Notes |
|---|---|---|
| Node.js | 18+ | LTS recommended |
| npm | 9+ | Included with Node.js |
Install
# Install globally via npm npm install -g contento-cli # Verify installation contento --version contento v0.1.0 # Or run without installing (one-shot) npx contento-cli --version
Configure Your AI Provider (BYOK)
Contento has no login or central account. The only thing the CLI needs to generate pages is an AI provider key. Run the interactive setup once:
contento config set ? AI Provider: OpenAI ? Model: gpt-4o-mini (default) ? API Key: ************************************ ✓ AI configuration saved to ~/.contento/config.json
Or pass it non-interactively (recommended for CI and agents):
contento config set \ --provider openai \ --model "gpt-4o-mini" \ --api-key "sk-proj-..."
You can also drop the provider key into an environment variable and skip config set entirely:
export OPENAI_API_KEY=sk-proj-... # or ANTHROPIC_API_KEY, GROQ_API_KEY, OPENROUTER_API_KEY
--provider on individual collections generate runs. Local models work too — point at any OpenAI-compatible endpoint via --base-url.
Configuration Files
Contento stores everything locally in ~/.contento/:
{
"provider": "openai",
"model": "gpt-4o-mini",
"apiKey": "sk-proj-...",
"workers": 5
}
Environment Variables
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI key (used when provider is openai) |
ANTHROPIC_API_KEY | Anthropic key |
GROQ_API_KEY | Groq key |
OPENROUTER_API_KEY | OpenRouter key |
CONTENTO_PROVIDER | Override the configured provider |
CONTENTO_MODEL | Override the configured model identifier |
NO_COLOR | Disable colored output |
Global Flags
| Flag | Description |
|---|---|
--json | Output machine-readable JSON instead of formatted tables |
--no-color | Disable colored output |
-v, --verbose | Enable verbose logging |
-V, --version | Show CLI version |
-h, --help | Show help for any command |
Verify Everything Works
# Confirm your AI configuration contento config show # Browse the bundled niches contento niches list --category "Software / SaaS" # List available schemas contento schemas list
Recommended: Set Up an Astro Site
Contento works with any static site or framework, but Astro is the cleanest fit and what we recommend for new projects. Astro produces static HTML, ships zero JavaScript by default, and treats Contento's output directory as just another set of files to serve. If you don't already have a host site, start here:
# Scaffold a new Astro site (in a sibling directory) npm create astro@latest my-site # Move into it and install cd my-site && npm install # Initialize a Contento project that outputs into Astro's public/articles/ contento init \ --name "My Articles" \ --domain example.com \ --output ./public/articles # Point chrome at Astro's compiled layout (after one astro build) npm run build contento projects chrome \ --header ./dist/_chrome/header.html \ --footer ./dist/_chrome/footer.html \ --css ./public/styles.css
Why Astro is the recommended host:
- Static HTML output — Astro's
npm run buildproduces exactly the kind of files Contento expects to live alongside - Zero-config drop-in — anything in
public/is served as-is on the same domain at on-domain paths - Layouts as chrome — an Astro layout component compiles to a header/footer pair you can hand to
contento projects chrome - Same deploy targets — Netlify, Vercel, Cloudflare Pages, S3, GitHub Pages all work for both Astro's site and Contento's pages without any extra config
Next Steps
- First Project — Create your first pSEO project and generate pages
- CLI Reference — All commands with flags and examples
- Agent Integration — Use Contento with AI agents
- Google Policies — What Contento handles structurally vs. what you own