A fast dependency updater for Python and Node.js projects
Project description
upd
A fast dependency updater for Python, Node.js, Rust, and Go projects, written in Rust.
Quick Start
# Run without installing (using uv)
uvx --from upd-cli upd
# Or with pipx
pipx run --spec upd-cli upd
# Preview changes without modifying files
uvx --from upd-cli upd -n
Features
- Multi-ecosystem: Python, Node.js, Rust, and Go dependencies
- Fast: Parallel registry requests for all dependencies
- Constraint-aware: Respects version constraints like
>=2.0,<3 - Smart caching: 24-hour version cache for faster subsequent runs
- Update filters: Filter by
--major,--minor, or--patchupdates - Interactive mode: Approve updates individually with
-i - Check mode: Exit with code 1 if updates available (for CI/pre-commit)
- Major warnings: Highlights breaking changes with
(MAJOR) - Format-preserving: Keeps formatting, comments, and structure
- Pre-release aware: Updates pre-releases to newer pre-releases
- Gitignore-aware: Respects
.gitignorewhen discovering files - Version alignment: Align package versions across multiple files
Installation
From crates.io
cargo install upd
# or with cargo-binstall (faster, pre-built binary)
cargo binstall upd
From PyPI
pip install upd-cli
# or with uv
uv pip install upd-cli
From source
git clone https://github.com/rvben/upd
cd upd
cargo install --path .
Usage
# Update all dependency files in current directory
upd
# Update specific files or directories
upd requirements.txt pyproject.toml
# Dry-run mode (preview changes without writing)
upd -n
upd --dry-run
# Verbose output
upd -v
upd --verbose
# Disable colored output
upd --no-color
# Disable caching (force fresh lookups)
upd --no-cache
# Filter by update type
upd --major # Show only major (breaking) updates
upd --minor # Show only minor updates
upd --patch # Show only patch updates
# Combine filters
upd --major --minor # Show major and minor updates only
# Interactive mode - approve updates one by one
upd -i
upd --interactive
# Filter by language/ecosystem
upd --lang python # Update only Python dependencies
upd -l rust # Short form
upd --lang python --lang go # Update Python and Go only
# Version precision
upd --full-precision # Output full versions (e.g., 3.1.5 instead of 3.1)
# Check mode - exit with code 1 if updates available (for CI/pre-commit)
upd --check
upd -c
upd --check --lang python # Check only Python dependencies
Commands
# Show version
upd version
# Check for upd updates
upd self-update
# Clear version cache
upd clean-cache
# Align versions across files (use highest version found)
upd align
upd align --check # Exit 1 if misalignments found (for CI)
Supported Files
Python
requirements.txt,requirements-dev.txt,requirements-*.txtrequirements.in,requirements-dev.in,requirements-*.indev-requirements.txt,*-requirements.txt,*_requirements.txtpyproject.toml(PEP 621 and Poetry formats)
Node.js
package.json(dependenciesanddevDependencies)
Rust
Cargo.toml([dependencies],[dev-dependencies],[build-dependencies])
Go
go.mod(requireblocks)
Example Output
pyproject.toml:12: Would update requests 2.28.0 → 2.31.0
pyproject.toml:13: Would update flask 2.2.0 → 3.0.0 (MAJOR)
Cargo.toml:8: Would update serde 1.0.180 → 1.0.200
Cargo.toml:9: Would update tokio 1.28.0 → 1.35.0
Would update 4 package(s) in 2 file(s), 15 up to date
Output includes clickable file:line: locations (recognized by VS Code, iTerm2, and modern terminals).
Version Precision
By default, upd preserves version precision from the original file:
# Original file has 2-component versions
flask>=2.0 → flask>=3.1 (not 3.1.5)
django>=4 → django>=6 (not 6.0.0)
# Original file has 3-component versions
requests>=2.0.0 → requests>=2.32.5
Use --full-precision to always output full semver versions:
upd --full-precision
flask>=2.0 → flask>=3.1.5
django>=4 → django>=6.0.0
requests>=2.0.0 → requests>=2.32.5
Version Alignment
In monorepos or projects with multiple dependency files, the same package might have different versions:
# requirements.txt
requests==2.28.0
# requirements-dev.txt
requests==2.31.0
# services/api/requirements.txt
requests==2.25.0
Use upd align to update all occurrences to the highest version found:
upd align # Align all packages to highest version
upd align --dry-run # Preview changes
upd align --check # Exit 1 if misalignments (for CI)
upd align --lang python # Align only Python packages
Behavior:
- Only aligns packages within the same ecosystem (Python with Python, etc.)
- Skips packages with upper bound constraints (e.g.,
>=2.0,<3.0) to avoid breaking them - Ignores pre-release versions when finding the highest version
Version Constraints
upd respects version constraints in your dependency files:
| Constraint | Behavior |
|---|---|
>=2.0,<3 |
Updates within 2.x range only |
^2.0.0 |
Updates within 2.x range (npm/Cargo) |
~2.0.0 |
Updates within 2.0.x range (npm) |
>=2.0 |
Updates to any version >= 2.0 |
==2.0.0 |
No updates (pinned) |
Caching
Version lookups are cached for 24 hours in:
- macOS:
~/Library/Caches/upd/versions.json - Linux:
~/.cache/upd/versions.json - Windows:
%LOCALAPPDATA%\upd\versions.json
Use upd clean-cache to clear the cache, or upd --no-cache to bypass it.
Environment Variables
| Variable | Description |
|---|---|
UV_INDEX_URL |
Custom PyPI index URL |
PIP_INDEX_URL |
Custom PyPI index URL (fallback) |
NPM_REGISTRY |
Custom npm registry URL |
GOPROXY |
Custom Go module proxy URL |
UPD_CACHE_DIR |
Custom cache directory |
Development
# Build
make build
# Run tests
make test
# Lint
make lint
# Format
make fmt
# All checks
make check
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file upd_cli-0.0.8.tar.gz.
File metadata
- Download URL: upd_cli-0.0.8.tar.gz
- Upload date:
- Size: 82.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770e27d73d1379abfaf556500707d1a6aa62f260afaaf42020e8205b2d7244b7
|
|
| MD5 |
01b538e71189fb0ea78e31499da9e35d
|
|
| BLAKE2b-256 |
4527340dcd08d6562552a3fa842704c0dddd02a9de2ffc84228a7366a09d49b1
|
File details
Details for the file upd_cli-0.0.8-py3-none-win_amd64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-win_amd64.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84b09a696627d7bf7e4bb5a29fb0a0c68ceefea4fd5c14071d24278ae37bab41
|
|
| MD5 |
251383c9d33a86a272afbca1ad14d72d
|
|
| BLAKE2b-256 |
ed5f4fcc683ccce53fc933047767d12e7e69adc5ec944d3da7b1de937d2700de
|
File details
Details for the file upd_cli-0.0.8-py3-none-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f12ca17bf50d7af461aee77c374eaaa17f90ba6b630d61c065991200f3a2a1e6
|
|
| MD5 |
88c7de54bb4a40dff6674e03151ad271
|
|
| BLAKE2b-256 |
f8ad4ef29918d742c1659ae864878f6bc5e878cd13a39e4c36a0e4a91a63f285
|
File details
Details for the file upd_cli-0.0.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1808c3a950cb48139f0dd91fa9a279f3b9f571321ff1a35ea6b59d12cce8cf26
|
|
| MD5 |
9ac2a041201ea5de08418401598727bf
|
|
| BLAKE2b-256 |
b08bc6b9893cd0de82405effdfd021448211e1e0b8706a580ac1b498fdd9d3e9
|
File details
Details for the file upd_cli-0.0.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
695dd10cb5d1679b97f7a13848c20b6a8002c65a9e546b65ee634e16a8ed0060
|
|
| MD5 |
9c98df0c6e2b52a719a9ba1a1abca5f9
|
|
| BLAKE2b-256 |
b5c0a16bb9db55a96fcbe74303597a455e7678d8384959654cbf8553c6fa3503
|
File details
Details for the file upd_cli-0.0.8-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 2.6 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ccba9ea5f87dbc9e786e29c416ea0bf72b9bffea87adea7cefec0f454462b91
|
|
| MD5 |
edf1e7b4c06b0ffda354d62d64e09f5e
|
|
| BLAKE2b-256 |
c8a04a44b46555266455fcb7bbdd1b8758df25c76616e4b82d8cb90fc78405d7
|
File details
Details for the file upd_cli-0.0.8-py3-none-macosx_10_12_x86_64.whl.
File metadata
- Download URL: upd_cli-0.0.8-py3-none-macosx_10_12_x86_64.whl
- Upload date:
- Size: 2.7 MB
- Tags: Python 3, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86ff948b78f6f6c38f02790a48f0583841cf7a1aabe35e4ec4dfaa5001553d61
|
|
| MD5 |
63b5273c229fd6b25debf0eae28ba7d3
|
|
| BLAKE2b-256 |
930c44a5576ce3df44ffaa59de1d46475736d1b8505997aefeaf01eec1f310a0
|