yarn import uv — Yarn CLI reference
Import uv projects as Yarn workspaces
Docs/Reference/CLI/import/uv
yarn import uv
Import uv projects as Yarn workspaces
yarn import uv <FOLDERS…>
For each folder containing a pyproject.toml, this command writes a package.json next to it describing the same dependencies, registers the folder as a workspace of the current project, and adds a venv island for it in .yarnrc.yml. The conversion covers:
project.dependencies→dependencies(pypi:ranges, extras and markers preserved); - thedevdependency group (and legacytool.uv.dev-dependencies) →devDependencies; other groups are reported and skipped unless listed with--group; -tool.uv.sourcespath / workspace entries →workspace:^(the target must be imported too, which happens automatically with--recursive); index entries → apackageRulesentry routing the package to the index; -tool.uv.override-dependencies→ the workspace’sresolutions; -tool.uv.constraint-dependencies→ the island’spypiConstraints; -requires-python→ the island’spythonVersion(lowest allowed minor); -uv.lock→ the island’spypiSeedLockfile, so the first install keeps the versions uv had locked; - uv workspace members → workspaces sharing their root’s island (uv resolves a workspace as a whole).
Run with --dry-run to print the generated files without writing them.
Also import the projects referenced through path sources and uv workspace members
Print the files that would be written, without writing them
Dependency groups (besides dev) to import as devDependencies
Extras of the imported projects to install in their own venvs, as
Install all the extras of the imported projects in their own venvs,