Skip to content

Incremental Updates ​

After your initial documentation is generated, use kodadocs update to efficiently update only the parts that changed. This is much faster than regenerating everything from scratch.

How It Works ​

  1. Re-discovers routes — scans your project for current routes
  2. Computes diff — compares against the previous route snapshot
  3. Selective capture — only re-captures screenshots for new or changed routes
  4. Selective annotation — only re-annotates affected screenshots
  5. Incremental enrichment — only regenerates articles for affected routes
  6. Full rebuild — rebuilds the VitePress site (this is always fast)

Usage ​

bash
# Basic update
kodadocs update .

# Force re-capture specific routes
kodadocs update . --routes /dashboard,/settings,/profile

# Update with a different app URL
kodadocs update . --url http://localhost:8080

# Update and deploy
kodadocs update . --deploy

What Triggers Updates ​

The diff engine detects three categories of changes:

  • Added routes — new pages that didn't exist before → captured and documented
  • Removed routes — pages that no longer exist → pruned from screenshots and articles
  • Changed routes — forced via --routes flag → re-captured and re-documented

Route Pruning ​

When routes are removed:

  • Screenshots for those routes are cleaned up
  • Articles that only reference removed routes are removed
  • The sidebar navigation is updated automatically

Requirements ​

Incremental updates require an existing manifest (.kodadocs/run_manifest.json). If no manifest exists, you'll be prompted to run kodadocs generate first.

When to Use Full Regeneration ​

Some changes warrant a full generate --fresh instead of update:

  • Major framework migration (e.g., Pages Router → App Router)
  • Significant UI redesign
  • Changed authentication method
  • Updated brand colors or theme

Was this page helpful?

Powered by KodaDocs