Odometer 🚀
A workspace version management tool that keeps package versions synchronized across projects.
Overview
Odometer provides intuitive commands to manage versions across project workspaces, with precise control over which packages get updated. Whether you need lockstep versioning for coordinated releases or independent versioning for different packages, odometer has you covered.
Currently supports: Rust/Cargo workspaces
Planned support: Node.js/npm, Python/pip, and other package ecosystems
Key Features
- 🎯 Precise Package Selection - Target specific packages, all workspace members, or just the root
- 🔄 Flexible Version Strategies - Independent versioning or lockstep synchronization
- 🛡️ Safe Defaults - Operations target workspace root only unless explicitly specified
- 📊 Clear Inspection - See current versions and validate version fields
- 🏗️ Workspace Inheritance Support - Handles
version = { workspace = true }correctly (Cargo) - ⚡ Fast & Reliable - Written in Rust with comprehensive test coverage
Installation
From Source
Usage
Odometer provides multiple binary names for convenience:
Quick Start
# See current versions
# Bump workspace root patch version
# Bump all workspace members independently
# Set all crates to same version (lockstep)
# Validate all version fields
Commands
odo show - Display Versions
Shows current versions for all workspace members:
odo roll - Increment Versions
Increment versions with precise control:
# Bump workspace root only (safe default)
# Custom increments
# Target all workspace members independently
# Target specific packages
odo set - Set Specific Versions
Set exact versions for packages:
# Set workspace root to specific version
# Set specific packages
odo sync - Lockstep Synchronization
Set ALL workspace members to the same version:
# Synchronize everything to 1.0.0
# After sync, all crates have identical versions
odo lint - Validate Versions
Check for missing or malformed version fields:
# Or with errors:
Package Selection
Odometer uses cargo-style package selection for precise control:
| Flag | Description | Example |
|---|---|---|
| (default) | Workspace root only | odo roll patch |
-p, --package |
Specific package(s) | odo roll patch -p lib1 |
-w, --workspace |
All workspace members | odo roll --workspace patch |
--exclude |
Exclude packages from --workspace |
odo roll --workspace --exclude lib1 patch |
Example Workflows
Coordinated Release Workflow
# Get everything synchronized first
# Now bulk operations work predictably
Independent Development Workflow
# Work on different features in different crates
# Bulk patch release when ready
Preparing Major Release
# Review current state
# Synchronize for coordinated release
Workspace Support
Odometer properly handles:
- Workspace roots with
[workspace]sections - Member crates in subdirectories
- Workspace inheritance (
version = { workspace = true }) - Mixed scenarios (some crates inherit, others don't)
- Single crate projects (no workspace)
Development
Setup
Testing
Available Make Targets
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Run the test suite (
make test-all) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Architecture
Odometer uses a clean architecture with three main layers:
- Domain (
src/domain.rs) - Pure business logic for version operations - IO (
src/io/) - File system operations (currently Cargo, designed for Node.js/Python expansion) - CLI (
src/cli.rs) - Command-line interface and orchestration
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Made with ❤️ for the Rust community