Skip to content

Install and manage custom Pi extensions from the UI #497

Description

Problem

Users who want to use custom Pi extensions (e.g. npm:pi-file-injector) currently have no way to discover, install, or manage them in ThinkRail.

Because ThinkRail runs Pi embedded in-process, users often will not have the standalone pi CLI binary installed on their PATH. For such users, all standard instructions or documentation recommending pi install <source> fail with command-not-found unless the user knows how to manually edit ~/.pi/agent/settings.json, drop files into ~/.pi/agent/extensions/, or run npx @earendil-works/pi-coding-agent install ....

Proposed solution

Provide a way in ThinkRail to install and manage Pi extensions directly from the UI:

  • An Extensions section in Settings to install extensions by its spec (e.g. npm:<pkg>, git:<url>).
  • Under the hood, leverage Pi's package manager (DefaultPackageManager) to resolve and install packages into ~/.pi/agent/npm or project .pi/ and persist them to settings.json.
  • List currently installed extensions, their source (bundled vs. user/project), and allow toggling or removing them.

Alternatives considered

  • Requiring users to install the pi CLI globally via npm install -g @earendil-works/pi-coding-agent or run commands via npx / bunx.
  • Requiring users to manually edit ~/.pi/agent/settings.json or .pi/settings.json.
  • Having users manually copy extension scripts into ~/.pi/agent/extensions/.

Additional context

Related to #203 (pi extension management).

🤖 Generated by AI agent

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions