Skip to content

feat: resolve shopq from local pi bin — no global install needed#29

Merged
c99e merged 4 commits intomainfrom
feat/local-bin-extension
Mar 28, 2026
Merged

feat: resolve shopq from local pi bin — no global install needed#29
c99e merged 4 commits intomainfrom
feat/local-bin-extension

Conversation

@c99e
Copy link
Copy Markdown
Owner

@c99e c99e commented Mar 28, 2026

What

Adds a pi extension that uses a bash spawn hook to prepend .pi/npm/node_modules/.bin to PATH. This means shopq resolves automatically when installed as a pi package — no bun install -g shopq required.

Changes

  • extensions/shopq-path.ts — bash spawn hook that adds the local bin dir to PATH
  • package.json — registers extensions/ in the pi manifest, adds it to files, adds @mariozechner/pi-coding-agent as a peer dep, bumps to 0.4.0
  • skills/shopq/SKILL.md — removes the global install instruction

How it works

When a user runs pi install npm:shopq, pi installs the package to .pi/npm/node_modules/shopq/. The binary lands at .pi/npm/node_modules/.bin/shopq. The extension overrides the bash tool to prepend that directory to PATH before every command, so the agent can just run shopq products list directly.

Each project gets its own isolated .pi/npm/ tree, so different projects can pin different versions without conflict.

c99e added 4 commits March 28, 2026 15:15
- Add extensions/shopq-path.ts that uses a bash spawn hook to prepend
  .pi/npm/node_modules/.bin to PATH, so shopq resolves without a
  global install
- Register extensions dir in pi manifest and files array
- Remove global install instruction from SKILL.md
- Add @mariozechner/pi-coding-agent as peer dependency
- Bump version to 0.4.0
Prevents npm warning when installing shopq globally as a standalone CLI
without pi present.
…ensions from pi manifest

- SKILL.md now instructs the agent to suggest global install if shopq
  is not on PATH (supports non-pi CLIs)
- Remove extensions from pi manifest since pi auto-discovers from
  the extensions/ convention directory
@c99e c99e merged commit 5f502bc into main Mar 28, 2026
3 checks passed
@c99e c99e deleted the feat/local-bin-extension branch March 28, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant