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
2 changes: 0 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [master]
branches: [main, master]
pull_request:
branches: [master]
branches: [main, master]

jobs:
check:
Expand All @@ -16,8 +16,6 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -28,17 +26,17 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Typecheck
- name: Type check
run: pnpm run typecheck

- name: Smoke test
run: pnpm run smoke-test

- name: Test
- name: Run tests
run: pnpm run test

- name: Lint
- name: Lint (Biome)
run: pnpm run lint

- name: Format check
- name: Check formatting (Biome)
run: pnpm run format:check
23 changes: 19 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
#!/usr/bin/env sh
set -eu

# fnm: set up the correct Node/pnpm environment
export PATH="$HOME/.fnm:$PATH"
eval "$(fnm env --shell bash)"
if ! command -v node >/dev/null 2>&1; then
echo "pre-commit: node was not found in PATH." >&2
echo "If you use a Node version manager, expose it in ~/.config/husky/init.sh so Git hooks use your own Node." >&2
exit 127
fi

pnpm run check
if command -v corepack >/dev/null 2>&1; then
if corepack pnpm --version >/dev/null 2>&1; then
exec corepack pnpm run check
fi
fi

if command -v pnpm >/dev/null 2>&1; then
exec pnpm run check
fi

echo "pre-commit: pnpm was not found in PATH." >&2
echo "Install pnpm, or expose it in ~/.config/husky/init.sh for Git hooks." >&2
exit 127
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A better way to manage Pi extensions. Browse, install, enable/disable, and remove extensions from one place.
Built on top of Pi's native package install, update, and config flows, so extmgr stays aligned with current upstream behavior.

**🌐 [pi-extmgr landing page](https://ayagmar.github.io/pi-extmgr)**

Expand All @@ -15,9 +16,9 @@ A better way to manage Pi extensions. Browse, install, enable/disable, and remov
pi install npm:pi-extmgr
```

Then reload Pi.
If Pi is already running, use `/reload`.

Requires Node.js `>=22.5.0`.
Requires Node.js `>=22`.

## Features

Expand Down Expand Up @@ -155,7 +156,7 @@ Examples:

- **Staged local changes**: Toggle local extensions on/off, then press `S` to apply all at once.
- **Package extension config**: Select a package and press `c` (or Enter/A → Configure) to enable/disable individual package entrypoints.
- After saving package extension config, restart pi to fully apply changes.
- After saving package extension config, run /reload to apply changes.
- **Two install modes**:
- **Managed** (npm): Auto-updates with `pi update`, stored in pi's package cache, supports Pi package manifest/convention loading
- **Local** (standalone): Copies to `~/.pi/agent/extensions/{package}/`, so it only accepts runnable standalone layouts (manifest-declared/root entrypoints), requires `tar` on `PATH`, and rejects packages whose runtime `dependencies` are not already bundled with the package contents
Expand Down
80 changes: 80 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"$schema": "https://biomejs.dev/schemas/2.4.9/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": true,
"includes": ["**", "!docs/assets/tailwind.css", "!docs/package-lock.json"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 100
},
"javascript": {
"formatter": {
"quoteStyle": "double",
"trailingCommas": "es5",
"semicolons": "always"
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedImports": "error",
"noUnusedVariables": "warn"
},
"performance": {
"noNamespaceImport": "error"
},
"style": {
"noCommonJs": "error",
"useImportType": {
"level": "error",
"options": {
"style": "inlineType"
}
},
"useNodejsImportProtocol": "error"
},
"suspicious": {
"noExplicitAny": "error"
},
"nursery": {
"noFloatingPromises": "error"
}
}
},
"overrides": [
{
"includes": ["test/**/*.ts"],
"linter": {
"rules": {
"nursery": {
"noFloatingPromises": "off"
}
}
}
},
{
"includes": ["docs/**/*"],
"linter": {
"enabled": false
}
}
],
"assist": {
"enabled": true,
"actions": {
"source": {
"organizeImports": "on"
}
}
}
}
18 changes: 6 additions & 12 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>pi-extmgr — Extension Manager for Pi</title>
<meta
name="description"
content="A better way to manage Pi extensions. Browse, install, enable/disable, and remove extensions from one place."
content="A better way to manage Pi extensions. Browse, install, enable/disable, and remove extensions from one place with Pi's native package flows underneath."
/>

<!-- Compiled Tailwind CSS -->
Expand Down Expand Up @@ -70,8 +70,8 @@ <h1 class="text-4xl sm:text-5xl font-semibold text-white leading-tight mb-6">
class="text-neutral-300 hover:text-white underline underline-offset-4"
>Pi</a
>
extensions from a unified interface. No more digging through directories or editing
config files.
extensions from a unified interface. Built on Pi's native package flows, without the
extra directory spelunking or config-file editing.
</p>

<!-- Live Stats -->
Expand Down Expand Up @@ -369,15 +369,9 @@ <h2 class="text-2xl font-semibold text-white mb-6">Install</h2>
<code class="font-mono text-sm text-neutral-300">pi install npm:pi-extmgr</code>
</div>
<p class="text-neutral-400 mb-8">
Then reload
<a
href="https://pi.dev"
target="_blank"
rel="noopener"
class="text-neutral-300 hover:text-white underline underline-offset-4"
>Pi</a
>
and type
If Pi is already running, use
<code class="text-white bg-neutral-800 px-1.5 py-0.5 rounded text-sm">/reload</code>,
then type
<code class="text-white bg-neutral-800 px-1.5 py-0.5 rounded text-sm">/extensions</code>
to open the manager.
</p>
Expand Down
52 changes: 0 additions & 52 deletions eslint.config.js

This file was deleted.

27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"README.md"
],
"scripts": {
"lint": "eslint . --max-warnings=0",
"lint:fix": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "biome lint . --error-on-warnings",
"lint:fix": "biome check --write .",
"format": "biome format --write .",
"format:check": "biome format .",
"typecheck": "tsc --noEmit -p tsconfig.json",
"smoke-test": "node --import=tsx ./scripts/smoke-test.mjs",
"test": "node --import=tsx --test ./test/*.test.ts",
"check": "pnpm run typecheck && pnpm run smoke-test && pnpm run test && pnpm run lint && pnpm run format:check",
"check": "tsc --noEmit -p tsconfig.json && node --import=tsx ./scripts/smoke-test.mjs && node --import=tsx --test ./test/*.test.ts && pnpm run lint && pnpm run format:check",
"prepublishOnly": "pnpm run check",
"prepare": "husky"
},
Expand All @@ -42,22 +42,19 @@
"@mariozechner/pi-tui": "*"
},
"devDependencies": {
"@mariozechner/pi-coding-agent": "^0.62.0",
"@mariozechner/pi-tui": "^0.62.0",
"@types/node": "^22.13.10",
"@typescript-eslint/eslint-plugin": "^8.42.0",
"@typescript-eslint/parser": "^8.42.0",
"eslint": "^9.38.0",
"eslint-config-prettier": "^10.1.8",
"@biomejs/biome": "^2.4.9",
"@mariozechner/pi-coding-agent": "^0.63.1",
"@mariozechner/pi-tui": "^0.63.1",
"@types/node": "^22.19.10",
"husky": "^9.1.7",
"prettier": "^3.8.1",
"tsx": "^4.19.3",
"tsx": "^4.21.0",
"typescript": "^5.9.3"
},
"author": "ayagmar",
"license": "MIT",
"packageManager": "[email protected]",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Make pnpm versioning single-sourced.

Line 55 adds a pinned packageManager, but CI is still pinning pnpm separately and the workflow is already failing with ERR_PNPM_BAD_PM_VERSION. As written, this PR blocks the pipeline; please let either package.json or the GitHub Action own the pnpm version, not both.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 55, The package.json currently pins pnpm via the
"packageManager" field which conflicts with the CI workflow that also pins a
pnpm version causing ERR_PNPM_BAD_PM_VERSION; choose a single source of truth by
removing or unpinning the "packageManager" entry in package.json (the
"packageManager" key) or alternatively remove the pnpm pin from the CI workflow
so only one location controls the pnpm version—update whichever source you keep
to the desired pnpm version and ensure the other no longer specifies pnpm to
avoid mismatches.

"engines": {
"node": ">=22.5.0"
"node": ">=22"
},
"repository": {
"type": "git",
Expand Down
Loading
Loading