Skip to content

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 ​

OptionTypeDefaultDescription
app_urlstringhttp://localhost:3000URL where your app is running (for screenshots)
authobjectnullAuthentication config for protected pages
include_patternsstring[]["**/*"]Glob patterns for files to include in analysis
exclude_patternsstring[][]Glob patterns for files to exclude
frameworkstringauto-detectedFramework identifier (e.g., Next.js, Django)
project_pathstring—Absolute path to your project
output_pathstring./docsWhere to generate the VitePress site
brand_colorstring#3e8fb0Primary brand color used in the docs theme
theme_namestringdefaultTheme preset name
logo_pathstringnullPath to your logo image
ai_modelstringclaude-sonnet-4-6Model for product analysis and article planning
generation_modelstringclaude-haiku-4-5-20251001Model for article content generation
skip_aibooleanfalseDisable AI features (auto-set if no API key)
blur_piibooleantrueBlur detected PII in screenshots
license_keystringnullKodaDocs Pro license key (format: kd_pro_*)
site_slugstringnullSubdomain 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 ​

VariablePurpose
ANTHROPIC_API_KEYEnables AI-powered analysis and article generation
ANTHROPIC_MODELOverride the AI model (default: claude-sonnet-4-6)
KODADOCS_LICENSE_KEYPro license key (alternative to config file)
KODADOCS_API_URLOverride 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 generate picks 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 . --fresh

Supported Frameworks ​

KodaDocs auto-detects and supports:

FrameworkRoute Discovery Method
Next.jsapp/ (App Router) and pages/ (Pages Router) directories
SvelteKitsrc/routes/ directory
Nuxtpages/ directory
React RouterJSX/TSX route definitions
WordPressAdmin menu items from PHP plugin headers
DjangoURL patterns
FastAPIEndpoint definitions
ExpressRoute definitions
RemixRoute conventions
AstroPages directory

If static analysis finds too few routes, KodaDocs falls back to a Playwright-based crawler that navigates your running application to discover pages.

Was this page helpful?

Powered by KodaDocs