pascal add¶
Add a workspace package as a dependency of another brick.
Arguments¶
| Argument | Description |
|---|---|
PACKAGE |
Name of the workspace package to add |
--to TARGET |
Name of the app (or package) that should depend on it |
What it does¶
- Appends
<package>to thedependencieslist in<TARGET>/pyproject.toml - Adds a
[tool.uv.sources]entry so UV resolves it from the workspace rather than PyPI:
- Prints a reminder to run
uv sync
Note
pascal add does not call uv sync automatically. Run uv sync after wiring dependencies to update the lockfile.
Example¶
pascal create package cart
pascal create app storefront
pascal add cart --to storefront
# then install
uv sync
Resulting apps/storefront/pyproject.toml:
Idempotent¶
Running pascal add cart --to storefront a second time is safe — pascal detects the dependency is already present and exits cleanly with a warning.
Errors¶
| Condition | Message |
|---|---|
| Package not in workspace | Package 'x' not found in workspace |
| Target not in workspace | Target 'x' not found in workspace |
Target has no [project] section |
Target 'x' has no [project] section |