pi-sync-instructions
Pi extension that compiles a folder of agent instructions (INDEX.md + linked files) into Pi's AGENTS.md on startup.
Package details
Install pi-sync-instructions from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-sync-instructions- Package
pi-sync-instructions- Version
1.0.0- Published
- Nov 3, 2026
- Downloads
- 346/mo · 346/wk
- Author
- thewildebeest
- License
- MIT
- Types
- extension
- Size
- 8.9 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-sync-instructions
A Pi extension that compiles a folder of agent instructions into Pi's AGENTS.md on every session start.
The folder must contain an INDEX.md that links to instruction files as ./name.md. Each linked file that exists is appended to <agent dir>/AGENTS.md (default ~/.pi/agent/AGENTS.md).
Install
pi install npm:pi-sync-instructions
Configure the instructions folder
Default: ~/.agents/instructions. Precedence, highest first:
- CLI flag:
pi --instructions-dir ~/my/instructions - Env var:
PI_SYNC_INSTRUCTIONS_DIR=~/my/instructions - Config file
~/.pi/agent/sync-instructions.json(honoursPI_CODING_AGENT_DIR):{ "instructionsDir": "~/my/instructions", "outputFile": "~/.pi/agent/AGENTS.md", "logFile": "~/.pi/instructions-sync.log" } ~/.agents/instructions
~ is expanded; relative paths resolve from the current directory. outputFile and logFile are optional.
Usage
- Sync runs automatically on
session_start. Errors show as notifications. - Run
/sync-instructionsto re-sync without restarting. - Sync history is appended to the log file.
Development
npm test
pi -e ./ # try locally
License
MIT