OSS-Index Database
lynkctl db manages the OSS-index database that generate uses to identify vendored open-source projects. The database is a local cache; db keeps it current and lets you inspect it.
Cache Locations
By default, lynkctl stores the database in the operating system cache directory:
macOS: ~/Library/Caches/lynkctl/oss-index/oss-index.db
Linux: $XDG_CACHE_HOME/lynkctl/oss-index/oss-index.db
(or ~/.cache/lynkctl/oss-index/oss-index.db)Override the location with --cache-dir DIR. The file inside is always named oss-index.db.
Common Flags
All db subcommands accept:
--cache-dir
Directory holding oss-index.db; empty uses the OS default cache location.
--oss-index-url
Override the OSS-index download URL (staging or mirror).
Subcommands
db download
Fetch or refresh the cache from the published URL — roughly 300 MB. The command is idempotent: it skips the transfer when the cached file already matches the published manifest. On success it prints the resolved cache path to stdout.
--force
Re-download even when the local cache matches the published manifest.
db check
Compare the cached database against the published manifest. It does not modify the cache, which makes it suitable as a CI gate signal.
The exit code is 0 when the cache is up to date, and 1 when it is stale, missing, format-incompatible, or a network error occurred.
--format
text
text (human-readable) or json (machine-readable).
db info
Inspect the cached database without touching the network: format version, build date, sha256, file size, and self-described index statistics (project, version, and file counts) when the database is present.
--format
text
text or json.
db path
Print the absolute path lynkctl uses for the OSS-index cache, resolved against --cache-dir or the OS default. Useful in scripts.
db clear
Delete the cached database and its manifest sidecar. The command is idempotent — it exits 0 if nothing is cached — and removes a partial cache too. It prompts for confirmation unless --yes is given.
--yes
false
Skip the interactive confirmation prompt.
Related
Air-Gapped Environments — pre-fetch the database and run lynkctl offline
Last updated