uvmigrate
v0.2.1
Published
Safe Poetry-to-uv migration CLI with blocker detection and CI checks
Maintainers
Readme
uvmigrate
uvmigrate helps you migrate Python projects from Poetry ([tool.poetry]) to uv/PEP 621 ([project]) safely.
It focuses on predictable conversion and clear failure modes for CI.
Why this exists
Many teams want uv speed and lockfile workflow, but migration is easy to get wrong when pyproject.toml has custom sources, plugins, or legacy Poetry fields.
uvmigrate gives you:
- blocker detection before conversion,
- conversion from Poetry tables to uv-friendly tables,
- safe write mode with automatic backup,
--checkmode for CI drift detection.
Install
npm install -g uvmigrateOr run directly with npx:
npx uvmigrate inspect pyproject.toml --checkQuick Start
Inspect your project first:
uvmigrate inspect pyproject.toml --checkConvert to a separate output file:
uvmigrate convert pyproject.toml --output pyproject.uv.toml --report migration.txtOverwrite the original file (creates backup automatically):
uvmigrate convert pyproject.toml --writeCI Check Mode
Use this to ensure a committed converted file stays up to date:
uvmigrate convert pyproject.toml --output pyproject.uv.toml --checkExit codes:
0: output file exists and matches current conversion result1: blockers found, output missing, or output is stale
What gets converted
tool.poetrymetadata ->projecttool.poetry.dependencies->project.dependencies- optional dependencies + extras ->
project.optional-dependencies(orphan optional deps become same-name extras) - dependency groups ->
dependency-groups - Poetry plugin tables ->
project.entry-points - Poetry sources + source-linked dependencies ->
tool.uv.index+tool.uv.sources
Safety Model
inspectsurfaces blockers and warnings before writing anything.convert --writealways creates a timestamped backup.- conversion aborts on blockers unless
--forceis provided.
Limitations
uvmigrate intentionally blocks or warns when conversion is ambiguous, for example:
tool.poetry.packages(manual review required)- invalid plugin structures
- dependencies that reference undefined sources
- optional dependencies that are not listed in
tool.poetry.extras(warns and maps to same-name extras)
Development
npm testLicense
MIT
