/ opencodehub / docs / development / publishing-cli.md
swadhinbiswas docs: complete documentation overhaul and changelog update · 1/21/2026
bba9bff
44 lines · 880 Bytes
Raw Download

Publishing Guide

NPM Registry

To publish the OpenCodeHub CLI to the official npm registry:

  1. Login to npm:

    npm login
    
  2. Run the publish script:

    ./scripts/publish-cli.sh
    

GitHub Packages (Other Registry)

To publish to GitHub Packages:

  1. Configure .npmrc:
    Create a .npmrc file in cli/ with:

    @swadhinbiswas:registry=https://npm.pkg.github.com
    
  2. Update Package Name:
    In cli/package.json, change the name to allow scoped publishing:

    "name": "@swadhinbiswas/opencodehub-cli"
    
  3. Authenticate:
    Generate a Value Access Token (PAT) with write:packages scope on GitHub.

    npm login --scope=@swadhinbiswas --registry=https://npm.pkg.github.com
    
  4. Publish:

    cd cli
    npm publish