feat: NPM wrapper + Trusted Publishing + Docker GHCR - #21
Merged
Merged
Conversation
- Add npm/ directory with CLI wrapper for `npx knowledge-rag` - Wrapper auto-detects Python 3.11+, manages venv, installs from PyPI - All wrapper output to stderr (MCP protocol compatibility) - Cross-platform: Windows (python, py -3) + Linux/macOS (python3) - Version pinning: NPM version syncs with PyPI version automatically - Fix release.yml: use Trusted Publishing (OIDC) instead of API token - Add build artifact separation (build once, publish once) - Add NPM publish step with automatic version sync from git tag - Add Docker push to GHCR (ghcr.io/lyonzin/knowledge-rag) - Add proper permissions scoping per job
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npm/) — enablesnpx knowledge-ragfor zero-config installationghcr.io/lyonzin/knowledge-rag:latestNPM Wrapper Details
The wrapper is a thin Node.js CLI that:
python/py -3, Unixpython3/python)~/.knowledge-rag/venvZero external dependencies. Pure Node.js stdlib.
Release Pipeline Changes
PYPI_API_TOKENsecret (broken)Manual Steps Required (before merging)
releaseenvironment in repo settingsNPM_TOKENsecret toreleaseenvironmentSee PR comments for detailed instructions.
Files Changed
.github/workflows/release.yml— complete rewritenpm/package.json— NPM package metadatanpm/bin/cli.js— CLI wrapper (266 lines, zero deps)npm/README.md— NPM-specific docsnpm/.npmignore— whitelist-only publish filter