@robzolkos/pi-nocchio

A tiny Pi extension that adds --dump-system-prompt.

Package details

extension

Install @robzolkos/pi-nocchio from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@robzolkos/pi-nocchio
Package
@robzolkos/pi-nocchio
Version
0.0.1
Published
Apr 29, 2026
Downloads
not available
Author
robzolkos
License
MIT
Types
extension
Size
6.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/dump-system-prompt.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-nocchio

A tiny Pi package that adds a CLI flag for printing Pi's assembled system prompt.

What it does

pi-nocchio registers:

--dump-system-prompt

When the flag is present, Pi prints the turn-accurate assembled system prompt to stdout and exits before calling the model.

Install

pi install npm:@robzolkos/pi-nocchio

You can also try it directly from GitHub:

pi -e git:github.com/robzolkos/pi-nocchio --dump-system-prompt

Usage

Print the assembled system prompt for a dump turn:

pi --dump-system-prompt

Save it to a file:

pi --dump-system-prompt > system-prompt.txt

You can also provide your own initial prompt text:

pi --dump-system-prompt -p "dump" > system-prompt.txt

If no prompt is provided, pi-nocchio runs an internal synthetic -p "dump" turn so Pi still runs turn-scoped hooks like before_agent_start. The synthetic turn exits before any model request.

Notes

  • The flag exits before any model request is made.
  • When --dump-system-prompt is not used, the extension only performs cheap flag checks in event hooks; practical performance impact is negligible.
  • Output is captured while Pi builds the request context, after the full before_agent_start chain, so turn-scoped system-prompt changes from other extensions are included.
  • If no prompt is provided, pi-nocchio runs a synthetic dump turn internally instead of printing a misleading startup-only prompt.
  • The output includes Pi's loaded tools, context files, skills, custom system prompt, appended system prompt, current date, and current working directory as Pi assembles them.
  • This prints Pi's system prompt string. It does not include later provider-payload rewrites from before_provider_request hooks.

License

MIT