For full infrastructure deployment (GCP/Firebase), see DEPLOYMENT_GUIDE.md
This file covers: Publishing blend-studio (CLI) and blend-ui-mcp.
Note:
@juspay/blend-design-system(component library) is already published. See its existing workflow for that.
packages/mcp/PUBLISHING.mdforblend-ui-mcp
Every pull request to main or dev automatically publishes an ephemeral preview of @juspay/blend-design-system to pkg.pr.new. Reviewers and consumer teams can install the preview directly from a URL in the sticky PR comment:
pnpm add https://pkg.pr.new/@juspay/blend-design-system@<commit-sha>These previews are not real npm releases. They are tied to the PR's HEAD commit, are ephemeral by design, and must not be used in production. Real releases continue to go through the changesets → beta / stable flow described below.
The preview is published by the preview job in .github/workflows/ci.yml, gated on a successful build (needs: lint-build), and uses the pkg.pr.new GitHub App — no NPM_TOKEN or secrets required.
- Package Name:
@juspay/blend-design-system - Current Version:
0.2.43 - Registry: npm (public)
- Scope:
@juspay
- npm Account: Ensure you have an npm account with publish permissions for the
@juspayscope - Authentication: Login to npm using
npm login - Permissions: You need to be added as a maintainer/owner of the
@juspayorganization
# Ensure you're on the main branch and up to date
git checkout main
git pull origin main
# Install dependencies
pnpm install
# Run tests and linting
pnpm lintUpdate the version in packages/blend/package.json before publishing:
# From root directory - patch version (1.0.0 -> 1.0.1)
pnpm version:blend patch
# Or minor version (1.0.0 -> 1.1.0)
pnpm version:blend minor
# Or major version (1.0.0 -> 2.0.0)
pnpm version:blend major
# Or specific version
cd packages/blend && npm version 1.2.3# Build from root directory (monorepo)
pnpm -w run build:blendThis will:
- Run ESLint checks
- Compile TypeScript
- Bundle with Vite
- Generate type definitions
# Dry run to see what would be published
pnpm -w run publish:blend:dry# Publish from root directory
pnpm -w run publish:blendOr manually:
cd packages/blend
pnpm publish --access publicNote: The --access public flag is required for scoped packages (packages with @ prefix like @juspay/blend-design-system) to make them publicly accessible on npm.
- Check the package on npm: https://www.npmjs.com/package/@juspay/blend-design-system
- Test installation in a new project:
mkdir test-blend
cd test-blend
npm init -y
npm install @juspay/blend-design-systemThe published package includes:
dist/
├── main.js # Main entry point
├── main.d.ts # TypeScript definitions
├── style.css # Bundled styles
└── assets/ # Additional assets
README.md # Package documentation
We follow Semantic Versioning:
- MAJOR (X.0.0): Breaking changes
- MINOR (1.X.0): New features, backward compatible
- PATCH (1.0.X): Bug fixes, backward compatible
If you want to publish your own version or fork:
Edit packages/blend/package.json:
{
"name": "@juspay/blend-design-system",
"version": "1.0.0",
"repository": {
"type": "git",
"url": "https://github.com/your-username/your-repo.git"
},
"bugs": {
"url": "https://github.com/your-username/your-repo/issues"
},
"homepage": "https://your-website.com/"
}Update the installation instructions in packages/blend/README.md:
npm install @juspay/blend-design-systemimport { Button } from '@juspay/blend-design-system'
import '@juspay/blend-design-system/style.css'# Login to npm
npm login
# Check if you're logged in
npm whoami
# Check access to @juspay scope
npm access list packages @juspay# Clean and rebuild
pnpm clean
pnpm install
pnpm build:blendIf you get permission errors:
- Ensure you're a member of the
@juspayorganization - Check if the package exists and you have publish rights
- Contact the organization admin to add you as a maintainer
If the version already exists:
# Check current published version
npm view @juspay/blend-design-system version
# Update to a new version
cd packages/blend && npm version patchConsider setting up GitHub Actions for automated publishing:
- On Release: Automatically publish when a GitHub release is created
- On Tag: Publish when a version tag is pushed
- Manual Trigger: Workflow dispatch for manual publishing
- Never commit npm tokens to the repository
- Use npm automation tokens for CI/CD
- Regularly audit dependencies:
npm audit - Keep the package updated with security patches
For questions about publishing:
- Check npm documentation: https://docs.npmjs.com/
- Contact the Juspay development team
- Create an issue in the repository
1. blend-studio (CLI tool)
2. blend-ui-mcp (MCP package)
npm login
npm whoamiYou need publish permissions for:
@juspayscope (blend-design-system)- Unscoped packages (CLI, MCP)
cd packages/cli
pnpm build
# Verify binary works
node dist/index.js --helpnpm pack --dry-runnpm publish --access publicnpm view blend-studio
# Test global install
npm install -g blend-studio
blend-studio --version# Patch (0.1.0 → 0.1.1)
npm version patch && npm publish
# Minor (0.1.0 → 0.2.0)
npm version minor && npm publish
# Major (0.1.0 → 1.0.0)
npm version major && npm publishSee packages/mcp/PUBLISHING.md for the full MCP runbook.
Quick commands:
cd packages/mcp
npm version patch
npm run build
npm pack --dry-run
npm publishThe CLI has a GitHub Actions workflow at .github/workflows/publish-cli.yml.
- Create an NPM token at npmjs.com → Access Tokens → Generate New Token
- Add
NPM_TOKENsecret to GitHub:- Go to Settings → Secrets and variables → Actions
- Create an Environment called
npm - Add
NPM_TOKENsecret
- Go to Actions → Publish CLI (blend-studio)
- Click Run workflow
- Select:
- Version bump:
patch,minor, ormajor - Tag:
latest(stable) orbeta(pre-release) - Confirm: type
PUBLISH
- Version bump:
The workflow will:
- Bump the CLI version
- Build the CLI
- Publish to NPM under the selected tag
- Commit the version bump back to the repo
npm whoami
npm access list packages @juspay
# Contact org admin to add you as maintainerPackage hasn't been published yet. Run npm publish --access public.
rm -rf node_modules dist
pnpm install
pnpm buildThe token engine is now part of @juspay/blend-design-system. Ensure CLI's package.json references @juspay/blend-design-system with the tokens submodule:
{
"dependencies": {
"@juspay/blend-design-system": "^0.x.x"
}
}Then run pnpm install.
- Never commit npm tokens to the repository
- Use npm automation tokens for CI/CD
- Regularly audit dependencies:
npm audit