Appearance
Configuration
KodaDocs stores its configuration in .kodadocs/session_config.json within your project directory. You can create this file using kodadocs init, or let kodadocs generate auto-configure with smart defaults.
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
app_url | string | http://localhost:3000 | URL where your app is running (for screenshots) |
auth | object | null | Authentication config for protected pages |
include_patterns | string[] | ["**/*"] | Glob patterns for files to include in analysis |
exclude_patterns | string[] | [] | Glob patterns for files to exclude |
framework | string | auto-detected | Framework identifier (e.g., Next.js, Django) |
project_path | string | — | Absolute path to your project |
output_path | string | ./docs | Where to generate the VitePress site |
brand_color | string | #3e8fb0 | Primary brand color used in the docs theme |
theme_name | string | default | Theme preset name |
logo_path | string | null | Path to your logo image |
ai_model | string | claude-sonnet-4-6 | Model for product analysis and article planning |
generation_model | string | claude-haiku-4-5-20251001 | Model for article content generation |
skip_ai | boolean | false | Disable AI features (auto-set if no API key) |
blur_pii | boolean | true | Blur detected PII in screenshots |
license_key | string | null | KodaDocs Pro license key (format: kd_pro_*) |
site_slug | string | null | Subdomain for hosted deployment |
Authentication
If your app has protected pages, configure authentication so KodaDocs can capture screenshots of logged-in views:
json
{
"auth": {
"auth_url": "http://localhost:3000/login",
"username": "test@example.com",
"password": "test-password"
}
}KodaDocs uses Playwright's smart form detection to fill login forms automatically. Session state is saved to .kodadocs/storage_state.json for reuse across runs.
You can also use cookie-based authentication:
json
{
"auth": {
"cookie_name": "session_token",
"cookie_value": "your-session-cookie-value"
}
}Environment Variables
| Variable | Purpose |
|---|---|
ANTHROPIC_API_KEY | Enables AI-powered analysis and article generation |
ANTHROPIC_MODEL | Override the AI model (default: claude-sonnet-4-6) |
KODADOCS_LICENSE_KEY | Pro license key (alternative to config file) |
KODADOCS_API_URL | Override the API endpoint (for development) |
KodaDocs also reads .env files from your project directory automatically.
Pipeline Manifest
Pipeline progress is tracked in .kodadocs/run_manifest.json. This manifest:
- Records which steps have completed successfully
- Stores discovered routes, screenshots, and article data
- Enables resumption — if the pipeline is interrupted, re-running
kodadocs generatepicks up where it left off - Detects config changes via hash comparison and triggers a fresh run when needed
Use --fresh to clear the manifest and start from scratch:
bash
kodadocs generate . --freshSupported Frameworks
KodaDocs auto-detects and supports:
| Framework | Route Discovery Method |
|---|---|
| Next.js | app/ (App Router) and pages/ (Pages Router) directories |
| SvelteKit | src/routes/ directory |
| Nuxt | pages/ directory |
| React Router | JSX/TSX route definitions |
| WordPress | Admin menu items from PHP plugin headers |
| Django | URL patterns |
| FastAPI | Endpoint definitions |
| Express | Route definitions |
| Remix | Route conventions |
| Astro | Pages directory |
If static analysis finds too few routes, KodaDocs falls back to a Playwright-based crawler that navigates your running application to discover pages.