pi-dynamic-subagents

Starter scaffolding for creating Pi extensions and packages for Pi.

This repository provides boilerplate structure for registering custom tools, slash commands, prompt templates, and lifecycle hooks in Pi.

Installation

Install directly into Pi from GitHub:

# Global install (writes to ~/.pi/agent/settings.json)
pi install git:github.com/JustMarkDev/pi-dynamic-subagents

# Project-local install (writes to .pi/settings.json)
pi install -l git:github.com/JustMarkDev/pi-dynamic-subagents

Local development

Use Bun to install dependencies, run tests, and typecheck:

# Install dependencies
bun install

# Run tests
bun test

# Run TypeScript check
bun run typecheck

Test your local changes directly in Pi without reinstalling from git:

# Run a one-off session with this directory
pi -e ./

# Or link the directory directly in your settings
pi install ./

Project structure

pi-dynamic-subagents/
├── package.json              # Pi package manifest and peer dependencies
├── tsconfig.json             # TypeScript configuration
├── extensions/
│   ├── index.ts              # Extension entry point with boilerplate tool/command registrations
│   └── agents.ts             # Sample TypeScript interface definitions
├── prompts/
│   └── dynamic-plan.md       # Sample prompt template with argument placeholders
├── tests/
│   └── agents.test.ts        # Unit test scaffolding using bun:test
└── README.md