Skip to content

Logic-py/python-check-updates

pycu

CI Coverage Latest release Crates.io License: MIT OR Apache-2.0

A fast CLI that checks your Python project dependencies against PyPI and reports which ones have newer versions available. Inspired by npm-check-updates.

demo

fastapi        >=0.109.0  →  >=0.135.1
pydantic       >=1.10.0   →  >=2.12.5
uvicorn        >=0.20     →  >=0.34.0

3 packages can be updated.

Why I built this

Every week I'd open my Python projects, manually scan through pyproject.toml, look up each package on PyPI, and check whether I was falling behind. It was tedious, easy to miss something, and I kept thinking there has to be a better way.

There were existing tools, but none of them fit quite how I worked. I'd been spoiled by npm-check-updates in the Node world: one command, instant table, upgrade in place if you want. I wanted exactly that, but for Python something fast, dependency-file-aware, and with in-place upgrades that actually respected my version constraints.

So I built pycu.

Features

  • Supports pyproject.toml (PEP 621 / uv), pyproject.toml (Poetry), and requirements.txt
  • Concurrent PyPI lookups with configurable parallelism
  • In-place upgrades with --upgrade
  • Filter by bump level: major, minor, or patch only
  • JSON output for scripting
  • Self-updates via --self-update
  • Color-coded output showing exactly which version component changed, with 5 built-in color schemes including color-blind safe options
  • SHA-256 verified self-update downloads

Installation

Linux / macOS

curl -fsSL https://raw.githubusercontent.com/Logic-py/python-check-updates/main/install.sh | sh

Windows (PowerShell)

irm https://raw.githubusercontent.com/Logic-py/python-check-updates/main/install.ps1 | iex

Manual download

Download the binary for your platform from the latest release, extract it, and place it somewhere on your PATH.

From source

Requires Rust 1.85 or later (edition 2024).

cargo install --git https://github.com/Logic-py/python-check-updates

Uninstall

pycu --uninstall

This removes the pycu binary and its configuration directory.

Usage

Run in a directory that contains a pyproject.toml or requirements.txt:

pycu

Or point to a specific file:

pycu --file path/to/requirements.txt

Options

Flag Short Description
--file <PATH> Path to the dependency file (auto-detected if omitted)
--upgrade -u Rewrite the file in-place with updated constraints
--target <LEVEL> -t Only show major, minor, or patch bumps (default: latest)
--json Output results as JSON
--concurrency <N> Max concurrent PyPI requests (default: 10)
--set-color-scheme [SCHEME] Preview all color schemes, or save one persistently
--self-update Update pycu itself to the latest release
--uninstall Remove pycu from your system
--version Print the version

Examples

# Check all dependencies
pycu

# Upgrade the file in-place
pycu --upgrade

# Only show minor-level updates
pycu --target minor

# Check a specific requirements file
pycu --file requirements-dev.txt

# Machine-readable output
pycu --json

Color schemes

pycu ships with five built-in color schemes. Your preference is saved to ~/.config/pycu/config.toml (Linux/macOS) or %APPDATA%\pycu\config.toml (Windows) and applied automatically on every run.

Preview all schemes (shown with live colored examples in your terminal):

pycu --set-color-scheme

Set a scheme:

pycu --set-color-scheme default       # red / blue / green - GitHub-style SemVer severity
pycu --set-color-scheme okabe-ito     # orange / blue / teal - color-blind safe (Okabe-Ito)
pycu --set-color-scheme traffic-light # red / yellow / green - classic CI model
pycu --set-color-scheme severity      # purple / blue / gray - monitoring/observability style
pycu --set-color-scheme high-contrast # magenta / blue / yellow - maximum distinction

On first run, pycu will show the preview and prompt you to choose a scheme interactively.

JSON output

[
  {
    "name": "fastapi",
    "current": ">=0.109.0",
    "latest": "0.135.1"
  }
]

Supported formats

pyproject.toml - PEP 621 / uv

[project]
dependencies = [
    "fastapi>=0.109.0",
    "pydantic>=1.10.0,<2.0.0",
]

[project.optional-dependencies]
dev = [
    "pytest~=7.3.0",
]

[dependency-groups]
dev = [
    "mypy>=0.19.1,<2.0.0",
]

pyproject.toml - Poetry

[tool.poetry.dependencies]
fastapi = "^0.109.0"

[tool.poetry.group.dev.dependencies]
pytest = "~7.3.0"

requirements.txt

fastapi>=0.109.0
pydantic>=1.10.0,<2.0.0
pytest~=7.3.0  # dev

Roadmap

  • Private registry support - planned support for checking dependencies hosted on private PyPI-compatible registries (e.g. Artifact Registry, etc.)

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

License

Licensed under either of MIT or Apache-2.0 at your option.

About

A fast CLI to check your Python dependencies for newer versions on PyPI. Like npm-check-updates, but for Python.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors