Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions extensions/shopq-path.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* Adds .pi/npm/node_modules/.bin to the bash tool's PATH so that
* `shopq` (and any other pi-installed CLI) resolves without a global install.
*/

import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { createBashTool } from "@mariozechner/pi-coding-agent";

export default function (pi: ExtensionAPI) {
const cwd = process.cwd();

const bashTool = createBashTool(cwd, {
spawnHook: ({ command, cwd: spawnCwd, env }) => ({
command,
cwd: spawnCwd,
env: {
...env,
PATH: `${cwd}/.pi/npm/node_modules/.bin:${env.PATH ?? ""}`,
},
}),
});

pi.registerTool({
...bashTool,
execute: async (id, params, signal, onUpdate) => {
return bashTool.execute(id, params, signal, onUpdate);
},
});
}
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shopq",
"version": "0.3.9",
"version": "0.4.0",
"description": "A zero-dependency Shopify Admin CLI built on Bun",
"type": "module",
"license": "MIT",
Expand All @@ -9,6 +9,7 @@
},
"files": [
"dist",
"extensions",
"skills"
],
"scripts": {
Expand All @@ -35,6 +36,9 @@
"pi-package"
],
"pi": {
"extensions": [
"./extensions"
],
"skills": [
"./skills"
]
Expand All @@ -47,6 +51,12 @@
"@types/bun": "latest"
},
"peerDependencies": {
"@mariozechner/pi-coding-agent": "*",
"typescript": "^5.9.3"
},
"peerDependenciesMeta": {
"@mariozechner/pi-coding-agent": {
"optional": true
}
}
}
6 changes: 1 addition & 5 deletions skills/shopq/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ A zero-dependency Shopify Admin CLI. Structured JSON output, predictable exit co

## Setup

Install globally:

```bash
bun install -g shopq
```
If `shopq` is not found on PATH, it may not be installed globally. Let the user know they can install it with their package manager (e.g. `npm install -g shopq`, `bun install -g shopq`, etc.).

Configure credentials (one of):

Expand Down
Loading