Publishing Guide
NPM Registry
Section titled “NPM Registry”To publish the OpenCodeHub CLI to the official npm registry:
-
Login to npm:
Terminal window npm login -
Run the publish script:
Terminal window ./scripts/publish-cli.sh
GitHub Packages (Other Registry)
Section titled “GitHub Packages (Other Registry)”To publish to GitHub Packages:
-
Configure
.npmrc: Create a.npmrcfile incli/with:@swadhinbiswas:registry=https://npm.pkg.github.com -
Update Package Name: In
cli/package.json, change the name to allow scoped publishing:"name": "@swadhinbiswas/opencodehub-cli" -
Authenticate: Generate a Value Access Token (PAT) with
write:packagesscope on GitHub.Terminal window npm login --scope=@swadhinbiswas --registry=https://npm.pkg.github.com -
Publish:
Terminal window cd clinpm publish