changepacks 📦
A unified version management and changelog tool for multi-language monorepos.
Overview
changepacks is a Rust-powered CLI tool that brings consistent version management and changelog generation to polyglot projects. Inspired by changesets, it extends beyond JavaScript to natively support Node.js, Python, Rust, and Dart ecosystems with a single, fast, and reliable tool.
Why changepacks?
- 🌍 True Multi-Language Support - Manage versions across Node.js, Python, Rust, and Dart with unified workflow
- 🚀 Rust Performance - Fast, parallel operations with single binary distribution
- 🔗 Smart Dependencies - Automatic dependency resolution with topological sorting for publishing
- 💾 Format Preservation - Respects language conventions (JSON indentation, TOML formatting, YAML structure)
- 🌳 Git-Native - Uses git history for intelligent change detection
- 🎯 Developer-Friendly - Interactive CLI with colored output, tree views, and clear error messages
Recent Improvements
- 🔗 Workspace Dependency Updates - Automatically updates
workspace:*dependencies in package.json when referenced packages are updated - ⚙️ Update On Rules - Configure
updateOnin config to automatically trigger updates for dependent packages (e.g., bridge packages) - ✨ Enhanced Readability - Patch lists now display with newlines instead of commas for better visibility
- 📦 Dependency Sorting - Topological sort ensures packages publish in correct order
- 🎨 Improved Output - Tree view with colorized status and dependency visualization
- 🔧 Format Preservation - Maintains your file formatting (indentation, newlines) across all updates
Features
- 🚀 Multi-language Support - Native support for Node.js, Python, Rust, and Dart with workspace detection
- 📝 Changepack Logs - Track version updates with timestamped logs and detailed notes
- 🔄 Automated Updates - Smart version bumping with workspace dependency updates
- 🔗 Dependency Resolution - Topological sorting ensures dependencies publish before dependents
- ⚡ Fast CLI - Async Rust implementation with parallel operations
- 🎯 Project Detection - Automatic discovery of packages and workspaces via git
- 📊 Status & Visualization - Tree view of dependencies with change markers
- 💾 Format Preservation - Maintains indentation, newlines, and file formatting
- 🧪 Testing Support - Dry-run mode for updates and publishing
- 🔧 Configurable - Custom publish commands, ignore patterns, and base branch
Supported Languages & Package Managers
| Language | Package Manager | File | Status |
|---|---|---|---|
| Node.js | npm, pnpm, yarn | package.json |
✅ Supported |
| Python | pip, uv | pyproject.toml |
✅ Supported |
| Rust | Cargo | Cargo.toml |
✅ Supported |
| Dart | pub | pubspec.yaml |
✅ Supported |
Installation
Choose your preferred package manager:
Windows
Rust (Cargo)
Python
# pip
# uv (recommended)
Node.js
# npm
# pnpm
# yarn
# bun
Requirements
- Git repository (for project detection)
- Rust 1.91+ (for building from source)
Build from Source
The binary will be available at target/release/changepacks (or target/release/changepacks.exe on Windows).
Usage
Quick Start
- Initialize changepacks in your repository:
- Create a changepack when you make changes:
This opens an interactive session to select changed projects and write release notes.
- Update versions from changepack logs:
- Publish packages in dependency order:
Typical Workflow
# 1. Check which projects have changed
# 2. Create a changepack log for your changes
# → Select projects (Major/Minor/Patch)
# → Write changelog notes
# 3. Preview version updates
# 4. Apply version updates
# 5. Test publishing
# 6. Publish to registries
Check Project Status
View all projects with change detection:
Update Versions
Apply version bumps from changepack logs:
Publish Packages
Publish packages to their respective registries:
Options:
The publish command will:
- Discover all projects in your workspace
- Show which projects will be published
- Execute the publish command for each project (using language-specific defaults or custom commands from config)
Default publish commands by language:
- Node.js:
npm publish - Python:
uv publish - Rust:
cargo publish - Dart:
dart pub publish
Check Config
View the loaded changepacks config (from .changepacks/config.json):
This prints the merged and defaulted configuration, for example:
You can edit .changepacks/config.json to customize:
- Files/projects to ignore (
ignore) using glob patterns (default: empty). - The base branch to compare against for changes (
baseBranch, default:"main"). - The default main package for versioning (
latestPackage, optional). - Custom publish commands (
publish):- Set language-specific commands using language keys:
"node","python","rust","dart". - Set project-specific commands using relative paths (e.g.,
"bridge/node/package.json"). - If not specified, default commands are used (see Publish Packages section).
- Set language-specific commands using language keys:
- Dependency rules for forced updates (
updateOn):- Key: glob pattern for trigger packages (e.g.,
"crates/*/Cargo.toml"). - Value: list of package file paths that must be updated when trigger matches.
- When a package matching the trigger pattern is updated, all dependent packages will also be marked for update.
- Useful for bridge packages that wrap core libraries (e.g., when core Rust crate updates, automatically update Node.js and Python bindings).
- Key: glob pattern for trigger packages (e.g.,
If the config file is missing or empty, sensible defaults are used.
Default Command
Running changepacks without arguments starts an interactive session to select projects and create a changepack log.
Project Structure
changepacks/
├── crates/
│ ├── cli/ # CLI interface and commands
│ ├── core/ # Core types and traits
│ ├── node/ # Node.js project support
│ ├── python/ # Python project support
│ ├── rust/ # Rust project support
│ ├── dart/ # Dart project support
│ └── utils/ # Utility functions
├── examples/ # Example projects for testing
├── Cargo.toml # Workspace configuration
└── README.md
How It Works
- Project Detection: Walks git tree to discover
package.json,Cargo.toml,pyproject.toml,pubspec.yamlfiles - Change Tracking: Uses git diff to detect changed files, marking projects with modifications
- Changepack Logs: Stores version bump intentions in
.changepacks/changepack_log_*.jsonwith notes and timestamps - Version Updates: Reads changepack logs, calculates new versions (semver), updates files while preserving formatting
- Dependency Resolution: Topologically sorts projects by dependencies for correct publish order
- Publishing: Executes language-specific or custom publish commands in dependency order
Changepack Log Format
Development
Build Workspace
Run Tests
Lint Check
Run Examples
Test with example projects:
Architecture
The project follows a trait-based, modular architecture:
- Core (
crates/core) - Defines common traits (Package,Workspace,ProjectFinder) and types - Language Crates (
crates/{node,python,rust,dart}) - Implement language-specific project detection and version management - CLI (
crates/cli) - Command-line interface with clap, colored output, and interactive prompts - Utils (
crates/utils) - Shared utilities: git operations, version calculation, dependency sorting, config management - Bridges (
bridge/{node,python}) - N-API and PyO3 bindings for package manager distribution
Key Design Patterns
- Async-First: All I/O operations use tokio for parallel execution
- Format Preservation: Language-specific parsers (toml_edit, yamlpatch, serde_json) maintain file formatting
- Git-Native: Uses git2 library for change detection and repository operations
- Topological Sorting: Kahn's algorithm ensures correct publish order based on dependencies
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Sponsors
We're grateful to our sponsors for supporting changepacks development! If you're interested in sponsoring this project, please get in touch.
Used By
The following open-source projects and companies are using changepacks:
If you're using changepacks in your project, we'd love to feature you here! Please open a Pull Request to add your project or company.
License
This project is distributed under the MIT License. See the LICENSE file for more details.
Roadmap
- Node.js package management support
- Python package management support
- Rust package management support
- Dart package management support
- CI/CD integration support (JSON output, dry-run mode)
- Dependency-aware publishing with topological sorting
- Format preservation across all languages
- Interactive CLI with tree view and colored output
- Cross-platform distribution (Windows, macOS, Linux)
- N-API and PyO3 bindings for npm/PyPI
- Plugin system for additional languages
- CHANGELOG.md generation from changepack logs
- GitHub Actions integration
- Pre-release version support
Support
If you encounter any issues or have feature requests, please let us know on the Issues page.
Inspirations
- changesets - Version management for JavaScript projects