Update Command
Theupdate command re-extracts documentation from a source and intelligently updates only what has changed:
How It Works
- Extract: Fetches latest documentation from the source
- Compare: Computes content hashes to detect changes
- Diff: Identifies new, modified, deleted, and unchanged pages
- Update: Only re-embeds changed pages
- Sync: Updates both raw data and LanceDB
Update Options
Name of the library to update
Version to update (default: latest)
Override the source URL from sources.json
Skip confirmation prompts
Update Examples
Update from Configured Source
If the library is already in yoursources.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:What happens to deleted pages?
What happens to deleted pages?
Pages that no longer exist in the source are:
- Removed from LanceDB (all chunks deleted)
- Removed from raw data directory (JSON files deleted)
What happens to modified pages?
What happens to modified pages?
Modified pages are:
- Deleted from LanceDB (old chunks removed)
- Re-chunked and re-embedded
- Inserted into LanceDB with new embeddings
- Overwritten in raw data directory
What if no changes are detected?
What if no changes are detected?
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:Update from Git Repositories
When updating from git sources, specify the version tag:How does version detection work for git repos?
How does version detection work for git repos?
For git repositories:
- Default version is
"latest"(latest commit on default branch) - Use
--versionto 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
Schedule Regular Updates
Set up cron jobs or scheduled tasks to update frequently-changing documentation:
Troubleshooting Updates
Update shows 0 changes but I know content changed
Update shows 0 changes but I know content changed
Possible causes:
- Source returned cached content (try again later)
- Only metadata changed (not detected in content hash)
- Extraction filters excluded changed pages
Update fails with 'produced no pages' error
Update fails with 'produced no pages' error
This means extraction returned 0 pages. Check:
- Source URL is accessible
- Filter keywords aren’t too restrictive
- Git repo has content in docs_paths
Raw data exists but not in LanceDB
Raw data exists but not in LanceDB
OpenGround detects this and cleans up automatically:This happens if embedding was interrupted. The update will start fresh.