local-packagelisted
Install: claude install-skill ClipboardHealth/groundcrew
# Local Package Development
Use Clipboard's internal CLI (`@clipboard-health/cli`) to test package changes across repositories without publishing. The `cbh local-package` command wraps [yalc](https://www.npmjs.com/package/yalc) to simplify linking packages between sibling repositories.
## Prerequisites
See the [CLI README](https://github.com/ClipboardHealth/cbh-core/tree/main/packages/cli#local-package) for setup instructions.
## Commands
### Link packages
From the consuming repository, link packages from sibling repos:
```bash
cbh local-package link --packages <package-names...>
```
Example:
```bash
cbh local-package link --packages util-ts
```
This will:
1. Find the package in sibling `packages/*` directories
2. Build the package with nx
3. Push the built package to yalc
4. Update your `package.json` to use the yalc version
### Unlink packages
After testing, restore the published package versions:
```bash
cbh local-package unlink --packages <package-names...>
```
Example:
```bash
cbh local-package unlink --packages util-ts
```
## Workflow Example
To test changes to `util-ts` in `cbh-mobile-app`:
1. Make changes to `util-ts` in `core-utils`
2. From `cbh-mobile-app` root, run:
```bash
cbh local-package link --packages util-ts
```
3. Test your changes in `cbh-mobile-app`
4. When done, unlink:
```bash
cbh local-package unlink --packages util-ts
```
## Troubleshooting
- **Package not found**: Ensure the package exists in a sibling repo'