Skip to main content

Overview

OpenGround can extract documentation from local directories on your file system. This is useful for:
  • Internal documentation not hosted online
  • Development versions of documentation
  • Offline documentation access
  • Custom documentation repositories

Supported File Types

When extracting from local directories, 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 from local path

Use the add command with a local path:
The -y flag skips the confirmation prompt between extract and ingest.
2

Verify the library was added

List all libraries in your database:

Path Types

OpenGround supports multiple path formats:

Absolute Paths

Home Directory Expansion

Relative Paths

Version Handling

Local path sources automatically use date-based versions in the format local-YYYY-MM-DD.
The version is automatically generated based on the current date:
This allows you to track documentation changes over time:
The --version flag is ignored for local path sources. The date-based version is always used.

Auto-Detection

OpenGround automatically detects local paths based on these patterns:
  1. Filesystem existence - Path exists on disk (most reliable)
  2. Absolute Unix paths - Starts with /
  3. Home directory - Starts with ~
  4. Relative paths - Starts with ./ or ../
  5. Windows paths:
    • Drive letter: C:\, D:\
    • UNC paths: \\server\share
    • Backslash paths: \Users\...

All Available Flags

Arguments

  • LIBRARY - Name of the library (required)

Options

  • --source, -s TEXT - Local path to documentation directory
  • --yes, -y - Skip confirmation prompt between extract and ingest
  • --sources-file TEXT - Path to a custom sources.json file
The following flags are ignored for local path sources:
  • --version, -v - Local paths use date-based versions
  • --docs-path, -d - Not applicable to local paths
  • --filter-keyword, -f - Not applicable to local paths
  • --trim-query-params - Not applicable to local paths

Using Sources Files

When you add documentation with --source, OpenGround automatically saves the configuration to ~/.openground/sources.json:
1

First time: Add with source

This saves the local path to sources.json.
2

Later: Add by name only

The local path is retrieved from sources.json.
See Managing sources.json files for more details.

Updating Documentation

Each time you run add with a local path, a new date-based version is created:
To update the same day’s version:

Examples

Real-World Example: Internal Documentation

Development Workflow

Multiple Documentation Folders

Best Practices

Use Absolute or Home Paths

For sources.json reliability, prefer absolute or home directory paths over relative paths:

Organize by Date Versions

The automatic date versioning helps track documentation evolution:

Clean Up Old Versions

Remove outdated versions to save space:

Troubleshooting

Path Not Found

If OpenGround can’t find your path:

Permission Denied

Ensure OpenGround has read access:

No Files Found

Verify your directory contains supported file types:

Windows Path Issues

On Windows, use quotes for paths with spaces: