Skip to main content

No project description provided

Project description

changepacks logo

Crates.io PyPI npm bundle size npm version npm downloads license CI codecov GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub last commit Rust Python Node.js Bun

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, Dart, Java, and C# ecosystems with a single, fast, and reliable tool.

Why changepacks?

  • ๐ŸŒ True Multi-Language Support - Manage versions across Node.js, Python, Rust, Dart, Java, and C# 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 updateOn in 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, Dart, Java, and C# 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, 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.

Installation

Choose your preferred package manager:

Windows

winget install Changepacks.Changepacks

Rust (Cargo)

cargo install changepacks

Python

# pip
pip install changepacks

# uv (recommended)
uv add changepacks
uvx changepacks

Node.js

# npm
npm install @changepacks/cli
npx @changepacks/cli

# pnpm
pnpm install @changepacks/cli
pnpm dlx @changepacks/cli

# yarn
yarn install @changepacks/cli

# bun
bun install @changepacks/cli
bunx @changepacks/cli

Requirements

  • Git repository (for project detection)
  • Rust 1.91+ (for building from source)

Build from Source

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

  1. Initialize changepacks in your repository:
changepacks init
  1. Create a changepack when you make changes:
changepacks

This opens an interactive session to select changed projects and write release notes.

  1. Update versions from changepack logs:
changepacks update
  1. 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

Update Versions

Apply version bumps from changepack logs:

changepacks update              # Interactive confirmation
changepacks update --dry-run    # Preview without applying
changepacks update --yes        # Skip confirmation

Publish Packages

Publish packages to their respective registries:

changepacks publish

Options:

changepacks publish --dry-run           # Preview what would be published without actually publishing
changepacks publish --yes               # Skip confirmation prompts
changepacks publish --format json       # Output results in JSON format
changepacks publish --remote            # Use remote branch for change detection

The publish command will:

  1. Discover all projects in your workspace
  2. Show which projects will be published
  3. 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
  • Java: ./gradlew publish
  • C#: dotnet nuget push

Check Config

View the loaded changepacks config (from .changepacks/config.json):

changepacks config

This prints the merged and defaulted configuration, for example:

{
  "ignore": [
    "**/*",
    "!crates/changepacks/Cargo.toml",
    "!bridge/node/package.json",
    "!bridge/python/pyproject.toml"
  ],
  "baseBranch": "main",
  "latestPackage": "crates/changepacks/Cargo.toml",
  "publish": {
    "node": "npm publish",
    "python": "uv publish",
    "rust": "cargo publish",
    "dart": "dart pub publish",
    "bridge/node/package.json": "npm publish --access public"
  },
  "updateOn": {
    "crates/changepacks/Cargo.toml": ["bridge/node/package.json", "bridge/python/pyproject.toml"]
  }
}

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).
  • 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

  1. Project Detection: Walks git tree to discover package.json, Cargo.toml, pyproject.toml, pubspec.yaml, build.gradle.kts, build.gradle, and *.csproj files
  2. Change Tracking: Uses git diff to detect changed files, marking projects with modifications
  3. Changepack Logs: Stores version bump intentions in .changepacks/changepack_log_*.json with notes and timestamps
  4. Version Updates: Reads changepack logs, calculates new versions (semver), updates files while preserving formatting
  5. Dependency Resolution: Topologically sorts projects by dependencies for correct publish order
  6. 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
  • 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. 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
  • Java/Gradle package management support
  • C#/.NET 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

changepacks-0.2.27-py3-none-win_amd64.whl (4.3 MB view details)

Uploaded Python 3Windows x86-64

changepacks-0.2.27-py3-none-win32.whl (3.9 MB view details)

Uploaded Python 3Windows x86

changepacks-0.2.27-py3-none-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

changepacks-0.2.27-py3-none-musllinux_1_2_i686.whl (4.6 MB view details)

Uploaded Python 3musllinux: musl 1.2+ i686

changepacks-0.2.27-py3-none-musllinux_1_2_armv7l.whl (4.1 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

changepacks-0.2.27-py3-none-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

changepacks-0.2.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

changepacks-0.2.27-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (5.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ppc64le

changepacks-0.2.27-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (4.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ i686

changepacks-0.2.27-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (4.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARMv7l

changepacks-0.2.27-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.3 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

changepacks-0.2.27-py3-none-macosx_11_0_arm64.whl (4.2 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

changepacks-0.2.27-py3-none-macosx_10_12_x86_64.whl (4.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file changepacks-0.2.27-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 7670b9c7c8276ee0f2ab0920750683c705a219dee72b2b7f0253af4e71588502
MD5 70bcbc0548ac0617e2e0556df01df67a
BLAKE2b-256 c66b5ff44f597fb218b6171ac411bc42df2017f10f8ed5b84c7ae9df92fb19e9

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-win32.whl.

File metadata

  • Download URL: changepacks-0.2.27-py3-none-win32.whl
  • Upload date:
  • Size: 3.9 MB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.6

File hashes

Hashes for changepacks-0.2.27-py3-none-win32.whl
Algorithm Hash digest
SHA256 c57c628a9c63c920598bc18c0ffd04fcbcc9f7e753e655a0b887006af8652f31
MD5 2d4f0d5a6fdf0b817dc017ae1d7ad03f
BLAKE2b-256 479e29aa3dec8423139472ae480a7c4e8ff5022ba7762686a319fc976a7f8e0c

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 07fe4c01048fdb29036469f211f0b6a2cb7b94bf1359bc8e055604c287b039d6
MD5 7daca924658459658ac0885e2b4c4294
BLAKE2b-256 11d62d48142f5543d3d8f8f76637e09aeef2973aec40a639e9663c0ed720335f

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 3193f8bd0cc62ce905eb0bcef39af59c20fdb40f207feca829a0c7bb1475953e
MD5 5aa867a1d11d6086c1d714a2b60052fc
BLAKE2b-256 a02aadfb4542598caa688494aa9757a0a69b4f13effd3b3a419b225aae666853

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 4b098c0cc45adecc8fcee9478352337bccf7c8c74ac0d3c033d3f4339809c3d0
MD5 40bcd2f8361b155b424b7502de9a9170
BLAKE2b-256 67166d86f03ec22395d2d0cab7e49eeae89f4d64a5acb9a76c44b23f530f83db

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 49ef981bcd6d0d7ea9ec29740b5d6d324edb7cb24045423a606647b053eaf848
MD5 f0a58b635c41e5915a7a5a26b1765388
BLAKE2b-256 07d19561db2d4fc9eaa8b43be96fc067618b5864df8aba996f133aa2807638e2

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7b5220d06788e296ffed3fa36407bbc548b63b3fc086f025602da19f25741fae
MD5 f46ab009a4ded302b34be43138f71047
BLAKE2b-256 71895e62ed02a2b5eb79c67fb32d70842efde59a84cd1052ed963b020c0ebcfc

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 b04942de9c40871199428b6c0e73e3391bb4f59e568363e24c11ea6ac83c307d
MD5 4746efc4374447c57977d480bef86cb9
BLAKE2b-256 a02afc6b24582202e2acb18d6746ff0a14dc5746f6e4491440723a0606ab9565

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4b81d09f91fd8c91d92ad41bb496764464322b7407d443be93309048ad32bfdd
MD5 6230819336afa897c3bd422e3a45dbc6
BLAKE2b-256 0f2c5638dd27511e3212b3639d57cf1fb51ac33a6897ac4fa23003a32701e831

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f7e5ff0d013f679e509aabb062569b38b632dedcca79110aa21e74fc969bc81d
MD5 18dbbb7dce69dccad9624ecac9c3b513
BLAKE2b-256 0b35aa8c034f8e1d26825827b2e184e7d96d8052625cfaa2ff2991e4f2636d58

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 196a3ce62a463564bf866814fc11152cc6a0fcca904ebe04fb6e29270bf11a3f
MD5 44f898a6d929d295464b016ede6be8d3
BLAKE2b-256 b16590185889526a25881ab4e1c3791499c1a6c99176aa0bb9c7f16944edda71

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bcb95f57f6c0c99c74ee7f22ed7b774ed7686bb1be0fedf61bf71ff8bc73f58c
MD5 5599491d60d986eae28e0a0e65776b8f
BLAKE2b-256 c300dbab1f27ed0f03b7abaa64d9e6f90a269db21e70da1f8c6429738ea03d65

See more details on using hashes here.

File details

Details for the file changepacks-0.2.27-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for changepacks-0.2.27-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4e59f47f5210f64c60ded5236fddcea96d687555b31a8fe0613d18f5012ac4a0
MD5 35d81c92247c141b9dff16c3765b6e20
BLAKE2b-256 d6c95ac27d3c1de8159dfc6969e61ce98141bbd9b5a7be97a0badb875219fd6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page