# Using ~ for home directoryopenground add mylib --source ~/projects/mylib/docs -y# Expands to /home/user/projects/mylib/docs (Unix)# or C:\Users\user\projects\mylib\docs (Windows)
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:
Copy
# Run on February 28, 2026openground add mylib --source ~/docs -y# Creates version: local-2026-02-28# Run on March 1, 2026openground add mylib --source ~/docs -y# Creates version: local-2026-03-01
This allows you to track documentation changes over time:
Copy
# Query specific date versionopenground query "installation" --library mylib --version local-2026-02-28# List all versionsopenground list-libraries
The --version flag is ignored for local path sources. The date-based version is always used.
Each time you run add with a local path, a new date-based version is created:
Copy
# Day 1: Creates local-2026-02-28openground add mylib --source ~/docs -y# Day 2: Creates local-2026-03-01 (new version)openground add mylib --source ~/docs -y# Or use the update commandopenground update mylib -y
To update the same day’s version:
Copy
# First add todayopenground add mylib --source ~/docs -y# Version: local-2026-02-28# Later, same day - updates existing versionopenground add mylib --source ~/docs -y# Still version: local-2026-02-28, but with updated content
# Working on documentation locallycd ~/projects/awesome-lib# Add current docsopenground add awesome-lib --source ./docs -y# Make changes to docs...# vim docs/getting-started.md# Re-add to update (same version if same day)openground add awesome-lib --source ./docs -y# Test queriesopenground query "getting started" --library awesome-lib
For sources.json reliability, prefer absolute or home directory paths over relative paths:
Copy
# Good: Works from any directoryopenground add mylib --source ~/projects/mylib/docs -y# Less good: Only works from specific directoryopenground add mylib --source ./docs -y
# Check if path existsls ~/projects/mylib/docs# Use absolute pathopenground add mylib --source /home/user/projects/mylib/docs -y# Check for typospwd # Print current directoryls # List files