Coding tools · 0.1.2
Protect Claude Code, Gemini CLI, and Codex
ChatGPT in the browser is the laptop download. This file is for coding tools on this computer. The zip is still named AiProxy.
If you installed 0.1.0, turn it off now
Version 0.1.0 let git run without a check. Open the setup page and press No, leave them alone. Then install 0.1.2 below. Use the turn-off commands at the bottom if the setup page does not open.
Upgrading from 0.1.0? The setup page may say Not chosen yet at first. Your checks stay on. Press Yes, protect agents once to refresh the status.
-
1
Download the file for your chip. Open the Apple menu and choose About This Mac. If it says Apple M-series chip, choose Apple chip. If it says Intel, choose Intel.
Mac also needs Python 3
Rail uses Python 3 to run its checks. Open Terminal and type
python3 --version. If you see a version number, you are set. If you see an error, install Python 3 from python.org first. Without it, the checks do not run, and your coding app uses its own rules.Check the download (optional)
The long number is a fingerprint of the file. If it matches, the file is the one we published.
Apple chip:
4fc8dcb000c4a724103c3b8dca0bc6b54bd449c5bbd0225677da3759c07925faIntel chip:
4a0b1c29dc4f131deb54d08ad14e1481a1a5f3e1839afe903e3cd34d967972fdIn Terminal, run:
shasum -a 256 ~/Downloads/aiproxy-0.1.2-macos-arm64.zip -
2
Unzip the file, then double-click Open AiProxy.command. A Terminal window opens. That is expected.
macOS may stop the file first
The file is not signed with an Apple developer certificate. Right-click the file, choose Open, and confirm. If that option is not offered, go to System Settings → Privacy & Security, then click Open Anyway.
-
3
Press Yes, protect agents. The browser opens a setup page on this computer. Leave every account field empty. The page should then say On. Start the agent as you usually do.
-
4
If you use Codex, trust aisec once. Open Codex, type
/hooks, and trust aisec. Until you do, Codex is not checked, even if the setup page says On. Claude Code and Gemini CLI in Terminal need no extra step.
Test with a folder in your Documents
Make a test folder. In Finder, open Documents and create a folder named aisec-test. Put a text file named hello.txt inside it.
Add the folder to the rules list. In Finder, press Command-Shift-G, paste ~/.local/aiproxy/policy, and open max-boundary.yaml in TextEdit. First choose Format → Make Plain Text. Under read_write, add one line such as "/Users/you/Documents/aisec-test/**". Do not add all of /Users/you/**. That would open your whole home folder.
Test it. Ask the AI to read hello.txt with its file tool, not with cat or a shell command. It should open.
Test the other direction. Make a decoy file named aisec-decoy.txt in your home folder with the words FAKE TEST KEY. Ask the AI to read it. It should stay closed. If it opens, do not keep using that app. Press No, leave them alone and ask your IT contact for help.
Make the change in two places
Each time you double-click Open AiProxy.command, it copies the rules file from the unzipped folder into ~/.local/aiproxy the first time only. Change both copies, or your change will be lost on a fresh install. Closing Terminal does not remove the check.
-
1
Install Python 3 first. Download it from python.org. In the installer, check the box that says Add python.exe to PATH. Then open PowerShell and type
python. You should see a Python prompt.Python 3 is required
If Python 3 is missing, Rail does not start. Your coding app then decides what happens next, using its own rules. In a clean Windows Server 2022 test, the setup page refused to turn protection on without Python, so the install stops with a clear message. Install Python 3 before you continue.
Check the download (optional)
The long number is a fingerprint of the file. If it matches, the file is the one we published.
01090b83cc347a3d964f46a162fb73606c0097c06894a7a2ba1e7b643653021aIn PowerShell, run:
Get-FileHash $env:USERPROFILE\Downloads\aiproxy-0.1.2-windows-amd64.zip -
2
Unzip the file, then double-click Open AiProxy.bat. A page opens in your browser.
Windows may warn you first
The file is not signed by Microsoft, so Windows may say it is unrecognized. Choose More info, then Run anyway.
-
3
Press Yes, protect agents. Leave the account fields empty. The page should say On. Start the agent as you usually do.
-
4
If you use Codex, type
/hooksand trust aisec. Until you do, Codex is not checked, even if the setup page says On. Claude Code and Gemini CLI need no extra step.
On Windows, nothing is open on day one
Add your project folder to the rules file, as shown below, before you expect any file to open.
Add your project folder and test it
Add your project folder. Open %USERPROFILE%\.local\aiproxy\policy\max-boundary.yaml in a text editor. Under read_write, add one line for your project, such as "/C:/Users/you/dev/**". Do not add your whole user folder. That would also open the key.
Test it. Ask the AI to read a file inside that project folder with its file tool. It should open. Then make a decoy file named aisec-decoy.txt in your Documents folder with the words FAKE TEST KEY, and ask the AI to read it. It should stay closed. If it opens, press No, leave them alone and ask your IT contact for help.
A block by itself is not proof that the check is running, because a missing file can look the same. The test above shows both directions.
Make the change in two places
The rules file is copied from the unzipped folder into %USERPROFILE%\.local\aiproxy the first time only. Change both copies, or your change will be lost on a fresh install. Closing the window does not remove the check.
-
1
Download the file. Then open Terminal and paste the lines below. Terminal starts in your home folder, so the first line moves to Downloads. The last line starts aisec and keeps running in that window, so leave it open.
cd ~/Downloads tar -xzf aiproxy-0.1.2-linux-amd64.tar.gz cd aiproxy-0.1.2-linux-amd64 ./install.sh sudo mkdir -p /workspace sudo chown "$USER" /workspace printf 'hello\n' > /workspace/hello.txt aiproxy upLinux also installs extra sandbox tools. The file and command check does not use them in this version. To skip them, change the install line to
./install.sh --no-plugins.Check the download (optional)
Run
sha256sum ~/Downloads/aiproxy-0.1.2-linux-amd64.tar.gz. The result should be:e987d0d4d4ae00dc3711847fb02d08148f077677d45c017c4b7c30dd12bb5e33 -
2
Press Yes, protect agents on the page that opened. Leave the account fields empty. The page should say On. Start the agent as you usually do. If the page did not open, go to
http://127.0.0.1:18080/setup. -
3
If you use Codex, type
/hooksand trust aisec. Until you do, Codex is not checked, even if the setup page says On. Claude Code and Gemini CLI need no extra step.If this machine has an NVIDIA BlueField card, aisec notices it. This version does not use the card to isolate anything.
Test it and add your project folder
Ask the AI to read /workspace/hello.txt. It should open. Then make a decoy file, ~/aisec-decoy.txt, with the words FAKE TEST KEY, and ask the AI to read it. It should stay closed.
To add your project, edit ~/.local/aiproxy/policy/max-boundary.yaml and add one line under read_write, such as "/home/you/dev/**". Do not add your whole home folder. That would also open the key.
Turn it off
Open the setup page and press No, leave them alone. That removes the connection from Claude Code, Gemini CLI, and Codex. It does not delete the files you downloaded. There is no separate uninstall.
Turn-off commands for each computer
Mac: python3 ~/.local/aiproxy/scripts/enable_agent_hooks.py --disable
Windows, in PowerShell: python "$env:USERPROFILE\.local\aiproxy\scripts\enable_agent_hooks.py" --disable
Linux: aiproxy agents --disable
Want to know exactly what is checked, and what is not? Read the security notes.