Skip to content

About

Collection of my extensions for pi coding agent (https://shittycodingagent.ai/)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

pi agent extensions

Independently publishable packages for pi, maintained at stagefright5/pi-agent-extensions. The workspace uses Vite+ for development commands and pnpm for package management.

The workspace develops and typechecks against pi 1.3.0. Packages use pi's TypeScript extension format without a compilation step. Local development loads source directly; packing and publishing generate distribution metadata and assets.

Warning

Pi extensions execute with your user account's full system permissions. Review the source before installing or updating any extension or skill.

Packages

Workspace npm package Purpose Primary interface
Artifact Design @stagefright5/pi-artifact-design Design self-contained HTML artifacts with a local Vite dev server, theme/CSP harness, and single-file build /skill:artifact-design
Background Bash @stagefright5/pi-bg-bash Run pi's bash tool commands in the background once they outlast a short wait, with job tools, finish notifications, and a jobs manager bash override, job_* tools, /jobs, Alt+J
Jenkins CLI Operations @stagefright5/pi-jenkins-cli-operations Agent skill for safe Jenkins operations using the standalone jenkins command /skill:jenkins-cli-operations
Obsidian UI @stagefright5/pi-obsidian-ui Compact tool presentation with panel shades derived from the terminal background for pi Automatic tool styling; terminal-native theme
OpenAI Fast @stagefright5/pi-openai-fast Toggle OpenAI Fast mode (priority service tier) in pi /fast, pi --fast
Plan Mode @stagefright5/pi-plan-mode Evidence-guided planning and interactive plan review for pi /plan, Alt+P
Global Prompt History Search @stagefright5/pi-prompt-history-search Fuzzy reverse search across prompts in saved pi sessions Alt+R, /prompt-history
Prompt Truly Mine @stagefright5/pi-prompt-truly-mine Inline extension commands and composable skill/prompt context with cursor-restoring undo and redo for pi $ references, inline /, Ctrl+Z, redo shortcuts
Provider URL Logger @stagefright5/pi-provider-url-logger Log the provider, model, and base URL selected for pi provider requests Automatic
Side Agent @stagefright5/pi-side-agent Open an independent, fully capable side agent forked from the current conversation in a Rex split /side, /side new, /side send, /side inbox, side_agent_send
Compact Status Bar @stagefright5/pi-status-bar A compact single-line status bar for pi Automatic in TUI mode
Tool Explain @stagefright5/pi-tool-explain Show AI summaries for tool calls and save tool choices in Pi settings Automatic, /tool-explain
Tool Output Browser @stagefright5/pi-tool-output-browser Browse complete stored tool results without expanding every pi transcript row /tool-output
Jenkins CLI @stagefright5/jenkins-cli Guarded Jenkins CLI with named profiles, build validation, and artifact downloads jenkins
Pi Dialog @stagefright5/pi-dialog Framed pop-ups and ready-made dialogs (confirm, select, input, editor, document, loader) for pi extensions Library: openPopup, Popup, confirm, select, input, showDocument
Pi Extension Utilities @stagefright5/pi-extension-utils Shared status-line, private storage, and usage contracts for pi extensions Library: status-line and storage contracts
Pi Picker @stagefright5/pi-picker Fast multi-word fuzzy search, highlighted lists, and picker overlays for pi extensions Library: createPicker, Searcher, renderInlinePanel

Each package has its own source package.json, version, and README; Pi resource packages also have a Pi manifest. Standalone CLIs such as @stagefright5/jenkins-cli do not require pi. Packages release independently to npm. The repository root is private and is never published.

Install standalone packages

After a package is published, install only the extension, skill, or standalone CLI you want:

pi install npm:@stagefright5/pi-artifact-design
pi install npm:@stagefright5/pi-bg-bash
pi install npm:@stagefright5/pi-jenkins-cli-operations
pi install npm:@stagefright5/pi-obsidian-ui
pi install npm:@stagefright5/pi-openai-fast
pi install npm:@stagefright5/pi-plan-mode
pi install npm:@stagefright5/pi-prompt-history-search
pi install npm:@stagefright5/pi-prompt-truly-mine
pi install npm:@stagefright5/pi-provider-url-logger
pi install npm:@stagefright5/pi-side-agent
pi install npm:@stagefright5/pi-status-bar
pi install npm:@stagefright5/pi-tool-explain
pi install npm:@stagefright5/pi-tool-output-browser
npm install -g @stagefright5/jenkins-cli

Use pi config to enable or disable resources from installed packages.

Follow the terminal theme

Select terminal-native under Theme in Pi's /settings for panel shades derived from your terminal's background: slightly lighter on dark terminals, slightly darker on light terminals. Tool panels use a subtle shade; composer/messages and selection highlights use progressively stronger shades. Success and failure share the same panel shade and retain colored indicators. Text and status colors use the terminal's default foreground and ANSI palette. Without a reported background (or without the extension), the JSON theme falls back to terminal-default panels. Unlike Pi's built-in system theme, this does not assign blue/green/red hues to panels. If upgrading from obsidian-ice, remove its old theme symlink; source-linked installations need a link to extensions/obsidian-ui/themes/terminal-native.json in ~/.pi/agent/themes/. Compact tool presentation also works with other selected Pi themes.

The composer, pickers, dialogs, and status bar read Pi's active theme. Job, plan, and side-agent statuses are recolored after theme invalidation; with a different footer they use uncolored, terminal-aware fallback text. Live system changes depend on the terminal reporting its colors and appearance to Pi.

Local development

Install the global vp command using the Vite+ installation guide, then install workspace dependencies:

vp install

The workspace pins Vite+ through its catalog and pnpm 11.22.0 through packageManager; Vite+ downloads and delegates to that pnpm version.

Auto-discovery through a symlink

For development, point Pi's global extension directory at this repository's extensions/ workspace directory:

ln -s ~/PersonalDev/pi-agent-extensions/extensions ~/.pi/agent/extensions

Pi auto-discovers each extensions/*/index.ts. Shared libraries live in packages/* (Pi Picker, Pi Dialog, and Pi Extension Utilities); extensions import them through workspace links during development, and staging bundles a private copy into each published package under vendor/. Libraries may import other workspace libraries: staging follows those imports and vendors each library once. The Jenkins wrapper exposes its colocated SKILL.md for source-tree development; it calls the separately installed jenkins CLI. Edit a source file and run /reload in Pi; no package build or reinstall is required.

Temporary local loading

Load all packages from the root manifest while keeping other installed extensions enabled:

pi -e ~/PersonalDev/pi-agent-extensions

Load one package in isolation from the rest of this workspace:

pi -e ~/PersonalDev/pi-agent-extensions/extensions/plan-mode

If the same package is already loaded through the global symlink or npm, disable that copy with pi config before using -e to avoid duplicate handlers, commands, shortcuts, or UI components.

Tests and package validation

Typecheck extension sources against the public SDK, check generated indexes, test the packaging scripts, and run every package's Node tests:

vp run test

Run only the SDK typecheck with pnpm typecheck. Development SDK/TUI dependencies use the workspace catalog; host-provided packages remain peers in published packages.

Run one package's tests:

vp run @stagefright5/pi-prompt-truly-mine#test
vp run @stagefright5/pi-jenkins-cli-operations#test
vp run @stagefright5/jenkins-cli#test

Stage all packages and inspect the files that each workspace would publish (without uploading anything):

vp run pack:check

Check, fix, lint, and format the workspace:

vp check
vp check --fix
vp lint
vp fmt
vp staged

The staged block in vite.config.ts runs safe Oxlint fixes before Oxfmt for staged JavaScript and TypeScript sources, and formats supported staged text assets. .vite-hooks/pre-commit invokes vp staged; use vp hooks status to inspect the clone-local dispatcher.

For an interactive Pi smoke test, start Pi normally through the development symlink, or pass the package path with -e. TUI-specific editors, overlays, footers, and shortcuts must be tested interactively.

Generated package files

scripts/package-tools.mjs maintains two kinds of generated output:

  • Tracked indexes include this package table, installation lists, the root Pi manifest, and marked installation sections in package READMEs. A fresh checkout needs no build.
  • Ignored distribution directories under .tmp/publish/<package>/ contain runtime source and resources, the root LICENSE, an npm manifest, and a README with installation instructions and repository URLs.

The packaging integration tests require pnpm and tar on PATH. They pack all packages in a temporary workspace and inspect the tarballs without contacting a registry.

vp run packages:sync   # Update tracked indexes after changing package metadata
vp run packages:check  # Fail on drift without changing files
vp run packages:stage  # Check indexes and regenerate all distribution directories

Source manifests retain names, versions, descriptions, module type, package-specific keywords, dependencies, local Pi resources, and development scripts. packageTools.title and packageTools.interface supply catalogue labels. Packages under packages/ with named bin entries are standalone CLIs rather than libraries; their runtime directories must be listed in packageTools.include, their bin targets are validated during staging, and they receive npm global-install instructions without Pi keywords. License and repository defaults come from the root manifest; pi-package and extension/skill keywords are derived from each package's Pi resources. Publication access and the branch used in README repository links come from the Changesets configuration.

The shared publication policy includes root JavaScript/TypeScript source, README.md, CHANGELOG.md when present, and SKILL.md when present. Skill packages also include references/, scripts/, and template/. Tests, dependencies, build output, and hidden files (except template .gitignore files) are excluded. Package-local packageTools.include and packageTools.exclude arrays accept explicit package-relative file/directory paths for exceptions; exclusions still apply to includes. Symlinks and paths outside the package are rejected.

Each package's publishConfig.directory points to its generated directory. linkDirectory: false keeps workspace dependency links pointed at source. A prepack hook refreshes that package's output for direct pnpm packing/publishing; use the root release command for Changesets. Published manifests omit development scripts, development dependencies and generator metadata. Source dependency requirements and release versions remain explicit; unresolved local/catalog runtime dependency references fail staging rather than leaking into npm.

Do not edit .tmp/publish/ by hand or publish a source directory with a tool that ignores publishConfig.directory. Run packages:sync after adding or renaming a package or changing catalogue metadata, then commit the generated index changes. Root staging and per-package packing check drift before proceeding. Changelogs, templates, skill wrappers and the lockfile remain tracked. Changes to shared publication defaults may require Changesets for all affected packages.

Versioning and publishing

The packages use independent Changesets releases:

vp run changeset
vp run version-packages
vp install
vp run test
vp run pack:check
vp run release

Commit the generated version and changelog changes before publishing. The release command regenerates distribution directories before Changesets publishes them. Published Pi resource packages include the pi-package keyword for Pi package-gallery discovery; standalone CLIs do not. Packing and staging never publish or create release tags.

Local data and privacy

The packages run locally or connect to services you configure. Some read or write user data:

  • Jenkins CLI Operations connects to the configured Jenkins controller and stores non-secret connection metadata under the platform configuration directory. Credentials remain in the selected auth provider.
  • Plan Mode stores new plans and revision history under <agent-dir>/plans/. Resumed sessions retain their saved path, including older ~/.pi/plans/ directories. Optional summaries use the active model provider.
  • Prompt History Search reads saved Pi sessions across projects into an in-memory index and local persisted index.
  • Provider URL Logger appends endpoint metadata to <agent-dir>/provider-urls.log and rotates it at 1 MiB, keeping one archive. History and logging respect PI_CODING_AGENT_DIR.

No package intentionally uploads its own index or log. Normal agent requests and Plan Mode's generated change summaries still use the configured model provider.

About

Collection of my extensions for pi coding agent (https://shittycodingagent.ai/)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages