Getting Started
Requirements
Section titled “Requirements”- Node.js 20+ — this package’s
engines.nodeis>=20. The lockedbetter-sqlite3addon’s ownengineslist is vendor majors, not a prebuild-coverage claim. ghCLI (authenticated) for GitHub sync- C/C++ build tools for
better-sqlite3when a prebuild misses. The addon install script is dual-path:prebuild-install || node-gyp rebuild --release. A matching prebuild is used when one is available; otherwisenode-gypcompiles from source. That is not universal platform coverage. If install fails, see the better-sqlite3 troubleshooting guide.
Install
Section titled “Install”npm install -g @mcptoolshop/repo-knowledgeThis package has no product-level install script. npm installs the better-sqlite3 dependency, whose vendor script is prebuild-install || node-gyp rebuild --release.
Initialize
Section titled “Initialize”rk init bootstraps the workspace. It:
- Creates
rk.config.jsonin the current directory when missing (printsAlready existsif the file is already there) - Ensures the
data/directory exists (same create /Already existspath) - Opens the database via
openDbat the resolveddbPath(defaultdata/knowledge.db), which applies migrations - Seeds the canonical audit control catalog
The command is idempotent: a re-run is safe. Existing config and data/ stay in place; the database is opened again and controls are re-seeded.
rk initThis creates rk.config.json in the current directory with default settings:
{ "owners": ["your-github-org"], "localDirs": ["."], "dbPath": "data/knowledge.db", "artifactsRoot": "data/artifacts"}Sync repos
Section titled “Sync repos”Pull repository metadata from GitHub:
rk sync --owners my-orgThis fetches repo metadata via the gh CLI: names, descriptions, topics, stars, license info, and the repo’s primary language (primaryLanguage on the gh listing; stored as primary_language). GitHub sync does not populate a language-bytes map — it stores languages as an empty stub ({}). No source code is read from GitHub.
To also scan local directories for tech fingerprints and docs:
rk sync --owners my-org --local /path/to/reposVerify
Section titled “Verify”# Check database statisticsrk stats
# Inspect a specific repork show my-org/my-repo
# Search across everythingrk find "authentication"Configuration
Section titled “Configuration”All settings live in rk.config.json in your workspace root. Edit this file to change database path, GitHub owners, or local scan directories. See the Reference page for the full schema.