# pi-extensions

Monorepo of [pi](https://pi.dev) extension packages published under [`@oaalto-kodanbce`](https://www.npmjs.com/org/oaalto-kodanbce).

Each package is installable with `pi install npm:@oaalto-kodanbce/<name>` and declares its extensions via the `pi.extensions` field in `package.json`.

## Packages

| Package                                              | Description                                                                               |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| [`@oaalto-kodanbce/pi-ignore`](./packages/pi-ignore) | Re-include selected gitignored paths for agent discovery using a project `.piignore` file |

See each package's README for install commands, setup, and usage.

## Install a package

```bash
# global (user settings)
pi install npm:@oaalto-kodanbce/pi-ignore@1.0.0

# project-local (.pi/settings.json)
pi install npm:@oaalto-kodanbce/pi-ignore@1.0.0 -l

# try once without saving
pi -e npm:@oaalto-kodanbce/pi-ignore
```

## Development

This repo uses npm workspaces. From the root:

```bash
npm install
```

### Lint and format

ESLint and Prettier are configured at the repo root and apply to all packages. ESLint uses TypeScript strict type-checking plus `eslint-plugin-functional` strict presets (immutability, no classes, tacit style, no throw/try in pure code). Extension entrypoints and tests have scoped overrides for subprocess I/O and `node:test` patterns.

```bash
npm run lint          # check
npm run lint:fix      # auto-fix ESLint issues
npm run format:check  # check formatting
npm run format        # write formatting
```

A Husky pre-commit hook runs `lint` and `format:check` automatically (installed on `npm install` via `prepare`).

Package sources live under `packages/`. To test a package locally before it is on npm:

```bash
pi install ./packages/pi-ignore -l
```

Release workflow: push a tag matching `pi-ignore-v*` (see [`.github/workflows/publish.yml`](./.github/workflows/publish.yml)). Requires the `NPM_TOKEN` repository secret.

## License

MIT — see [LICENSE](./LICENSE).
