Changepacks is a Command Line Interface (CLI) tool designed to streamline versioning and changelog management across multiple programming languages. It supports Node.js, Python, Rust, and Dart, providing developers with a unified approach to handle version updates efficiently.
Key Features:
Multi-Language Support: Changepacks natively manages projects in Node.js, Python, Rust, and Dart.
Unified Version Management: Ensures consistent versioning across different package managers.
Automated Updates: Smartly bumps versions based on detected project changes.
CLI Interface: Offers a straightforward command-line experience for ease of use.
Project Detection: Automatically identifies projects in your workspace.
Status Tracking: Helps track which projects require version updates.
Audience & Benefit:
Ideal for developers working on multi-language projects, Changepacks offers a consistent and efficient workflow. It simplifies changelog management and ensures that all project versions are aligned across different technologies.
Changepacks can be installed via winget, making it easy to integrate into your development environment.
This tool is perfect for developers seeking to maintain a cohesive versioning strategy across diverse projects, enhancing productivity and reducing the complexity of managing multiple languages.
README
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 , it extends beyond JavaScript to natively support Node.js, Python, Rust, Dart, Java, and C# ecosystems with a single, fast, and reliable tool.
โก 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, bun
package.json
โ Supported
Python
pip, uv
pyproject.toml
โ Supported
Rust
Cargo
Cargo.toml
โ Supported
Dart
pub
pubspec.yaml
โ Supported
Java
Gradle
build.gradle.kts, build.gradle
โ Supported
C#
NuGet
*.csproj
โ Supported
> Note: Java/Gradle projects require the Gradle wrapper (gradlew) for version detection. The wrapper is used to resolve project properties dynamically.
git clone https://github.com/changepacks/changepacks.git
cd changepacks
cargo build --release
The binary will be available at target/release/changepacks (or target/release/changepacks.exe on Windows).
Usage
Quick Start
Initialize changepacks in your repository:
changepacks init
Create a changepack when you make changes:
changepacks
This opens an interactive session to select changed projects and write release notes.
Update versions from changepack logs:
changepacks update
Publish packages in dependency order:
changepacks publish
Typical Workflow
# 1. Check which projects have changed
changepacks check --tree
# 2. Create a changepack log for your changes
changepacks
# โ Select projects (Major/Minor/Patch)
# โ Write changelog notes
# 3. Preview version updates
changepacks update --dry-run
# 4. Apply version updates
changepacks update
# 5. Test publishing
changepacks publish --dry-run
# 6. Publish to registries
changepacks publish
Check Project Status
View all projects with change detection:
changepacks check # List all projects
changepacks check --tree # Show dependency tree
changepacks check --filter workspace # Only workspaces
changepacks check --filter package # Only packages
changepacks check --remote # Compare with remote branch
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", "java", "csharp".
Set project-specific commands using relative paths (e.g., "bridge/node/package.json").
If not specified, default commands are used (see Publish Packages section).
Custom dry-run publish commands (publishDryRun):
Overrides the dry-run command used by changepacks publish --dry-run.
Same keying rules as publish (language key or relative project path).
If not specified, changepacks publish --dry-run derives the dry-run command by appending --dry-run to the resolved publish command (e.g., npm publish --dry-run, cargo publish --dry-run).
Required for ecosystems whose publish tool does not support --dry-run natively (e.g., dotnet nuget push); without an override these projects are skipped with a warning.
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).
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
โ โโโ java/ # Java/Gradle project support
โ โโโ csharp/ # C#/.NET 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.yaml, build.gradle.kts, build.gradle, and *.csproj files
Change Tracking: Uses git diff to detect changed files, marking projects with modifications
Changepack Logs: Stores version bump intentions in .changepacks/changepack_log_*.json with 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
{
"changes": {
"packages/foo/package.json": "Minor",
"crates/bar/Cargo.toml": "Patch"
},
"note": "Add new feature X and fix bug Y",
"date": "2025-12-19T10:27:00.000Z"
}
Development
Build Workspace
cargo build
Run Tests
cargo test
Lint Check
cargo clippy
Run Examples
Test with example projects:
cd examples/node/common
changepacks check
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,java,csharp}) - Implement language-specific project detection and version management
CLI (crates/cli) - Command-line interface with clap, colored output, and interactive prompts