Skip to main content
OpenGround supports efficient incremental updates that only process changed pages, saving time and resources when refreshing documentation.

Update Command

The update command re-extracts documentation from a source and intelligently updates only what has changed:

How It Works

  1. Extract: Fetches latest documentation from the source
  2. Compare: Computes content hashes to detect changes
  3. Diff: Identifies new, modified, deleted, and unchanged pages
  4. Update: Only re-embeds changed pages
  5. Sync: Updates both raw data and LanceDB

Update Options

string
required
Name of the library to update
string
default:"latest"
Version to update (default: latest)
string
Override the source URL from sources.json
boolean
Skip confirmation prompts

Update Examples

Update from Configured Source

If the library is already in your sources.json or ~/.openground/sources.json:

Update with Source Override

Override the configured source:

Update Process Details

Content Hash Comparison

OpenGround computes SHA-256 hashes of page content to detect changes:

Update Summary

After updating, you’ll see a summary:
Pages that no longer exist in the source are:
  1. Removed from LanceDB (all chunks deleted)
  2. Removed from raw data directory (JSON files deleted)
This ensures your database stays in sync with the source.
Modified pages are:
  1. Deleted from LanceDB (old chunks removed)
  2. Re-chunked and re-embedded
  3. Inserted into LanceDB with new embeddings
  4. Overwritten in raw data directory
This ensures embeddings reflect current content.
If all pages are unchanged, OpenGround skips the embedding step:

Incremental Update Benefits

⚡ Faster

Only re-embeds changed pages instead of the entire library

💾 Efficient

Saves disk I/O and embedding API costs

🔄 Reliable

Hash-based comparison ensures accurate change detection

🎯 Precise

Maintains version consistency across raw data and embeddings

Update vs Add

The update command is actually an alias for add. When you run add on an existing library, OpenGround automatically detects it and performs an incremental update.

Update Workflow Example

Complete workflow for keeping a library up-to-date:

Local Path Updates

For local documentation sources, updates use date-based versions:
Local path sources always create new date-based versions on update. This is by design to preserve history. Old versions are not automatically deleted.

Update from Git Repositories

When updating from git sources, specify the version tag:
For git repositories:
  • Default version is "latest" (latest commit on default branch)
  • Use --version to specify a git tag or branch
  • The version corresponds to git refs (tags/branches)

Programmatic Updates

You can trigger updates from Python code:

Update Best Practices

1

Schedule Regular Updates

Set up cron jobs or scheduled tasks to update frequently-changing documentation:
2

Version Your Documentation

For production use, maintain version-specific libraries:
3

Monitor Changes

Review update summaries to track documentation evolution:
4

Test After Updates

Verify quality with test queries:

Troubleshooting Updates

Possible causes:
  • Source returned cached content (try again later)
  • Only metadata changed (not detected in content hash)
  • Extraction filters excluded changed pages
Solution: Delete and re-add the library for a fresh start:
This means extraction returned 0 pages. Check:
  • Source URL is accessible
  • Filter keywords aren’t too restrictive
  • Git repo has content in docs_paths
Test extraction separately:
OpenGround detects this and cleans up automatically:
This happens if embedding was interrupted. The update will start fresh.

Next Steps

Managing Libraries

List, remove, and view library statistics

Configuration

Configure automatic source tracking and update settings