This document outlines the steps to publish the DevContext package to the npm registry.
Before publishing, ensure you have:
- An npm account (create one at npmjs.com)
- Logged in to npm on your local machine
- Proper access rights to publish under the chosen package name
# Login to npm (if not already logged in)
npm login
# Verify you're logged in
npm whoamiMake sure the package content is correct:
# Perform a dry run to see what will be published
npm publish --dry-runReview the files that will be included in the published package and make sure no sensitive or unnecessary files are included.
Before publishing, ensure the package version is correctly set in package.json. Use semantic versioning:
- Major version: Breaking changes
- Minor version: New features (backward compatible)
- Patch version: Bug fixes (backward compatible)
To update the version:
# Update version directly
npm version patch # For bug fixes
npm version minor # For new features
npm version major # For breaking changes# Publish the package
npm publishAfter publishing, verify that your package is correctly published:
# View package info
npm view devcontext
# Install your package globally to test it
npm install -g devcontext
# Run your package
devcontextTo publish updates to an existing package:
- Make your changes
- Run tests
- Update the version (
npm version patch|minor|major) - Run
npm publish
- Remember that DevContext requires a TursoDB database, so make sure this requirement is clearly documented
- Consider adding unit tests before the 1.0.0 release
- Maintain clear documentation for the core MCP tools
If you encounter issues during publishing:
- Name conflicts: If the package name is already taken, you might need to scope it with your username (
@username/devcontext) - Permission errors: Ensure you have the right npm account and proper permissions
- Failed validation: Review the error messages and fix any package.json issues
If users have issues with the package, ensure they can reach out through:
- GitHub issues
- Documentation
- README contact information