Skip to main content
The openground add command extracts documentation from a source (sitemap, Git repository, or local path) and ingests it into the local vector database.

Usage

Arguments

string
required
Name of the library (or source key if no source is provided)

Options

string
default:"None"
Root sitemap URL, Git repo URL, or local path to process.Aliases: -sSupports:
  • Sitemap URLs (e.g., https://example.com/sitemap.xml)
  • Git repository URLs (e.g., https://github.com/user/repo.git)
  • GitHub/GitLab web URLs (e.g., https://github.com/user/repo/tree/main/docs)
  • Local paths (e.g., /path/to/docs, ~/docs, ./docs)
string
default:"latest"
Version of the library to extract. Only works for git repos. Corresponds to the tag of the version in the git repo.Aliases: -vNote: Sitemap sources always use “latest”. Local paths automatically generate date-based versions (e.g., local-2026-02-28).
list[string]
default:"[]"
Path to documentation within a git repo. Specify multiple times for multiple paths.Aliases: -dIf not specified, indexes the entire repository.Example:
list[string]
default:"[]"
String filter for sitemap URLs. Only used for sitemap sources. Can be specified multiple times.Aliases: -fExample:
boolean
default:"false"
Skip confirmation prompt between extract and ingest.Aliases: -y
string
default:"None"
Path to a custom sources.json file. If not provided, checks config for sources.file_path, then uses default (~/.openground/sources.json).
boolean
default:"false"
Trim query parameters from sitemap URLs to avoid duplicates.

Behavior

Source Detection

The command automatically detects the source type:
  1. Git Repository: URLs containing github.com or gitlab.com
  2. Sitemap: URLs ending with .xml or containing “sitemap”
  3. Local Path: Paths starting with /, ~, ./, or ../
For git and local path sources, these file extensions are parsed: .md, .rst, .txt, .mdx, .ipynb, .html, .htm

Library Updates

If the library already exists in the database, the command performs an incremental update:
  • Added: New pages from the source
  • Modified: Pages with changed content (detected via content hash)
  • Deleted: Pages removed from the source
  • Unchanged: Pages with identical content

Auto-Save to sources.json

When you provide a --source directly (not from a sources file), the configuration is automatically saved to ~/.openground/sources.json for future use. Disable this with:

Examples

Add from Sitemap

Add from GitHub Repository

Add from Local Path

Add with Filter Keywords (Sitemap Only)

Add from sources.json

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

Skip Confirmation Prompt

Output Example

Update Example