Skip to content

feat(penpal): add in-app CLI and Claude Code plugin installation#317

Merged
loganj merged 1 commit intomainfrom
loganj/penpal-install-tools
Mar 2, 2026
Merged

feat(penpal): add in-app CLI and Claude Code plugin installation#317
loganj merged 1 commit intomainfrom
loganj/penpal-install-tools

Conversation

@loganj
Copy link
Collaborator

@loganj loganj commented Mar 2, 2026

Summary

  • Adds a "Manage Command Line Tools..." menu item in the Penpal app menu and a startup modal that installs/updates the penpal CLI symlink and Claude Code plugin from within the app
  • New Go API endpoint (GET/POST /api/install-tools) handles symlink creation and claude plugin marketplace add / claude plugin install
  • Bundles .claude-plugin/marketplace.json and plugin/ directory in the app's Resources so the plugin can be installed without the source repo
  • Modal shows automatically on each new build — says "Install" for fresh installs, "Update" when tools already exist
  • Dismissing without tools installed persists (won't nag); dismissing with outdated tools does NOT persist (will show again next launch)
  • Simplifies justfile install/uninstall recipes since the app now handles CLI + plugin setup

Test plan

  • Go tests: cd apps/penpal && go test ./internal/server/ -run TestInstall (5 tests)
  • Frontend tests: cd apps/penpal/frontend && pnpm exec vitest run src/components/InstallToolsModal.test.tsx src/components/InstallStartup.test.tsx src/api.test.ts (23 tests)
  • Clippy: just lint passes
  • TypeScript: just typecheck passes
  • Manual: just install, trigger menu item, verify CLI + plugin installed
  • Verify plugin dir bundled: ls /Applications/Penpal.app/Contents/Resources/plugin/

🤖 Generated with Claude Code

@loganj loganj marked this pull request as ready for review March 2, 2026 01:35
@loganj loganj marked this pull request as draft March 2, 2026 01:36
@loganj loganj added the ai-outer-loop Managed by outer-loop label Mar 2, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7369c0e52

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@loganj loganj force-pushed the loganj/penpal-install-tools branch from b7369c0 to e1c6053 Compare March 2, 2026 01:40
@loganj loganj force-pushed the loganj/penpal-install-tools branch from e1c6053 to 1c1145b Compare March 2, 2026 02:07
Add a "Manage Command Line Tools..." menu item and startup modal that
handles installing/updating the penpal CLI symlink and Claude Code plugin
from within the app, removing the need to clone the repo and run
`just install` for these tasks.

- Go endpoint (GET/POST /api/install-tools) creates CLI symlink and
  runs claude plugin marketplace add/install
- Tauri menu item dispatches event to frontend
- Modal shows on each new build: "Install" for fresh, "Update" for
  existing tools, with per-build localStorage dismissal
- Bundle .claude-plugin/marketplace.json and plugin/ in app resources
- Simplify justfile install/uninstall (app handles tools now)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@loganj loganj force-pushed the loganj/penpal-install-tools branch from 1c1145b to ef24549 Compare March 2, 2026 02:17
@loganj loganj marked this pull request as ready for review March 2, 2026 02:19
@loganj loganj merged commit c02220b into main Mar 2, 2026
4 checks passed
@loganj loganj deleted the loganj/penpal-install-tools branch March 2, 2026 02:20
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef245498b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

rm -f "$(brew --prefix)/bin/penpal" 2>/dev/null || true
rm -rf /Applications/Penpal.app 2>/dev/null || true
echo "Penpal.app removed from /Applications."
rm -f "$(brew --prefix 2>/dev/null)/bin/penpal" 2>/dev/null || rm -f /usr/local/bin/penpal 2>/dev/null || true

Choose a reason for hiding this comment

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

P2 Badge Avoid short-circuiting fallback path in uninstall recipe

When brew is not installed, "$(brew --prefix 2>/dev/null)/bin/penpal" expands to /bin/penpal, and rm -f /bin/penpal succeeds even if the file is missing; because of the || chain, the /usr/local/bin/penpal fallback is never attempted. In that environment, just uninstall leaves the actual symlink behind, so the new fallback logic does not work as intended.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-outer-loop Managed by outer-loop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant