Set up a uv workspace (monorepo) with a single lockfile and cross-member dependencies

domain: docs.astral.sh/uv · 6 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. In the root pyproject.toml add: [tool.uv.workspace] members = ["packages/*"] exclude = ["packages/seeds"] `members` is required (globs allowed), `exclude` optional.
  2. Each member directory keeps its own pyproject.toml, but the workspace shares a SINGLE uv.lock at the root — one consistent resolution for all members.
  3. Depend on a sibling member: in the member's pyproject.toml list it in `[project] dependencies` and map it in `[tool.uv.sources]`: `bird-feeder = { workspace = true }`. Workspace member dependencies are installed editable.
  4. Run or sync a specific member from anywhere in the workspace: `uv run --package bird-feeder <cmd>` / `uv sync --package bird-feeder`.
  5. Lock once at the root (`uv lock`) and commit the shared uv.lock.
  6. Docs: https://docs.astral.sh/uv/concepts/projects/workspaces/

Known gotchas

Related routes

Add a local workspace package as a dependency of another workspace in a monorepo
docs.npmjs.com · 5 steps · unrated
Set up a Cargo workspace: members, shared [workspace.dependencies], resolver, per-crate commands
doc.rust-lang.org · 6 steps · unrated
Initialize a Python project and sync dependencies with uv
python-dependency-management · 4 steps · unrated

Give your agent this knowledge — and 17,200+ more routes

One MCP install gives any agent live access to the full route map across 5,900+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans