Skip to main content

Overview

OpenGround can extract documentation directly from git repositories using shallow clones and sparse checkout for efficiency. This is ideal for versioned documentation that uses git tags.

Supported File Types

When extracting from git repositories, OpenGround processes the following file extensions:
  • .md - Markdown
  • .mdx - MDX (Markdown with JSX)
  • .rst - reStructuredText
  • .txt - Plain text
  • .ipynb - Jupyter Notebooks
  • .html - HTML
  • .htm - HTML

Basic Usage

1

Add documentation with source URL

Use the add command with the --source flag to specify a git repository:
The -y flag skips the confirmation prompt between extract and ingest.
2

Verify the library was added

List all libraries in your database:

Specifying Documentation Paths

If documentation is in a specific subdirectory, use the --docs-path flag:

Multiple Documentation Paths

You can specify multiple paths by using the --docs-path flag multiple times:

Indexing Entire Repository

If you don’t specify --docs-path, OpenGround will index the entire repository:

Version Management

Using Git Tags

The --version flag allows you to specify a git tag to checkout:
This corresponds to the tag in the git repository (e.g., v0.109.0, 1.0.0, etc.).

Default Version

If no version is specified, OpenGround defaults to latest:

Multiple Versions

You can store multiple versions of the same library independently:
The --version flag only works with git repositories. Sitemap sources always use latest, and local path sources use date-based versions (e.g., local-2026-02-28).

Parsing GitHub Web URLs

OpenGround can automatically parse GitHub and GitLab web URLs:
OpenGround will automatically extract:
  • Repository URL: https://github.com/user/repo.git
  • Version: v1.0
  • Docs path: docs

All Available Flags

Arguments

  • LIBRARY - Name of the library (required)

Options

  • --source, -s TEXT - Git repo URL (e.g., https://github.com/user/repo.git)
  • --version, -v TEXT - Git tag to checkout (e.g., v1.0.0, defaults to latest)
  • --docs-path, -d TEXT - Path(s) to documentation within the repo (can be specified multiple times)
  • --yes, -y - Skip confirmation prompt between extract and ingest
  • --sources-file TEXT - Path to a custom sources.json file
The following flags are for sitemap sources only and are ignored for git repositories:
  • --filter-keyword, -f - Not applicable to git repos
  • --trim-query-params - Not applicable to git repos

Using Sources Files

When you add documentation with --source, OpenGround automatically saves the configuration to ~/.openground/sources.json. This allows you to re-add or update the library later using just the name:
1

First time: Add with source

This saves the configuration to ~/.openground/sources.json.
2

Later: Add by name only

The source URL and docs path are retrieved from sources.json.
See Managing sources.json files for more details.

Updating Documentation

To update an existing library with changes from the source:
This efficiently updates only changed pages by comparing content hashes. The update command is an alias for add when a library already exists.

Advanced: Direct Extract Command

For advanced use cases, you can use the extract-git command separately:
Then embed separately:
The extract-git command requires at least one --docs-path argument. Use / to extract the entire repository.

Examples

FastAPI Documentation

Multiple Versions Workflow

Entire Repository