Poly gives monorepos one CLI for dependency updates
Poly routes dependency commands to tools like pnpm, uv and Cargo, then checks whether a monorepo’s manifests and lockfiles match a shared snapshot.
In a monorepo, the web app might use pnpm while the Python API uses uv. Adding a dependency means switching commands as you move between projects. Poly, which its makers shared on Hacker News on November 27, gives both projects the same command format and leaves version resolution to their existing package managers.
Adding dependencies with Poly
Start at the repo root with Poly v0.6.2, pnpm and uv installed. This example uses an existing pnpm app in apps/web and a uv project in services/api:
# Add Zod to the web app
cd apps/web
poly add "npm:zod"
# Add FastAPI to the Python API
cd ../../services/api
poly add "pypi:fastapi"
Run each poly add from the folder whose dependencies you want to change. The prefix tells Poly which package ecosystem to use. Poly’s Node adapter detects the pnpm lockfile and runs pnpm add zod. Its Python adapter delegates to uv add fastapi when uv is available. Each tool still manages its own dependencies and lockfile.
What Poly’s lockfile checks
Back at the repo root, run poly sync with both projects listed in poly.toml to install dependencies across the workspace. Poly records hashes of the projects’ dependency declarations and detected lockfiles in poly.lock. If those files no longer match the snapshot, poly install --frozen stops before installing.
For CI: Poly’s v0.6.2 workspace code checks the snapshot, then runs each package manager’s normal install. Use your package managers’ own frozen-install options if CI needs to prevent lockfile changes.
Dependabot opens update PRs for you. Poly fits the changes you make yourself: add a package where it belongs, then sync the frontend and API from the same workspace without giving up either tool’s lockfile.
Loading content…