Skip to main content
The openground update command efficiently updates an existing library by comparing content hashes and only updating changed pages.

Usage

Arguments

string
required
Name of the library to update

Options

string
default:"latest"
Version to update.Aliases: -v
string
default:"None"
Override source URL. If not provided, uses the source from ~/.openground/sources.json.Aliases: -s
boolean
default:"false"
Skip prompts.Aliases: -y

Behavior

The update command is an alias for the add command when a library already exists. It performs an incremental update by:
  1. Extracting all pages from the source
  2. Comparing content hashes with existing pages in the database
  3. Categorizing pages as:
    • Added: New pages not in the database
    • Modified: Pages with different content hashes
    • Deleted: Pages in the database but not in the source
    • Unchanged: Pages with identical content
  4. Updating only the changed pages

Efficient Updates

Only pages that have been added, modified, or deleted are re-embedded and updated in the database. Unchanged pages are skipped, making updates fast and efficient.

Examples

Update from sources.json

Update Specific Version

Update with Override Source

Update Without Confirmation

Output Example

When to Use Update vs Add

  • Use update: When you want to explicitly update an existing library with the latest changes
  • Use add: When adding a new library for the first time, or when you want to add a new version
Both commands behave identically when the library already exists in the database.