singularity-forge/docs-internal/extending-pi/03-getting-started.md
Lex Christopherson d20d5e8fb5 docs: add Mintlify documentation site and move internal docs
Add a proper public-facing documentation site using Mintlify with 19 MDX
pages covering getting started, auto mode, commands, configuration, and
all user-facing features. Move internal/SDK documentation (Pi SDK, TUI,
context & hooks, research notes, ADRs) to docs-internal/ since they
should not be part of the public documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:54:41 -06:00

642 B

Getting Started

Minimal Extension

Create ~/.gsd/agent/extensions/my-extension.ts:

import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";

export default function (pi: ExtensionAPI) {
  pi.on("session_start", async (_event, ctx) => {
    ctx.ui.notify("Extension loaded!", "info");
  });
}

Testing

# Quick test (doesn't need to be in extensions dir)
pi -e ./my-extension.ts

# Or just place it in the extensions dir and start pi
pi

Hot Reload

Extensions in auto-discovered locations (~/.gsd/agent/extensions/ or .gsd/extensions/) can be hot-reloaded:

/reload