Install
Install with PiG
pig install npm:pi-sync-instructionsInstall with Pi
pi install npm:pi-sync-instructionsPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./extensions/index.ts"
]
}README
Written by the package's publisher, shown as published in version 1.0.0 (README.md). PiG does not review it.
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