Home / Articles

AI Safety Rules for Your Computer: Folders, Commands, Backups

Decide exactly what ChatGPT or Claude may do on your computer: only the folders you choose, no delete or shutdown commands, file tools only, and a backup before any file is changed.

Shellway lets ChatGPT, Claude and Cursor work on your own computer. You decide how far that goes. Besides read-only mode, you can set safety rules on the computer itself. The rules are stored on your computer, so the AI cannot change them.

Run these commands on the computer (PowerShell on Windows, Terminal on Mac and Linux). They work right away, without a restart. They need Shellway version 0.6 or newer.

Only the folders you choose

npx shellway policy allow C:\Users\you\Documents\work

From now on, file tools work only inside that folder (add more with the same command). Paths outside it, tricks like ..\ and shortcuts or links that point elsewhere are refused, and nothing changes. Commands start inside the allowed folder.

Block commands you never want

npx shellway policy block-deletes
npx shellway policy block "shutdown"

block-deletes blocks the common delete and format commands (rm, del, Remove-Item, rmdir, format and similar). Add any other word with block. A blocked command is not run at all, and the AI is told why.

File tools only

npx shellway policy commands off

The AI can still read, search and edit files in the allowed folders, but it cannot run commands or programs. This is the strictest setting while still letting the AI do useful work. A command can reach any folder your user account can, so if you rely on allowed folders, turn commands off too.

A backup before every change

npx shellway policy backups on

Before the AI overwrites or edits a file, Shellway keeps a copy in the .shellway/backups folder in your home folder, sorted by date. The AI's reply tells you where the copy is.

See or remove the rules

npx shellway policy
npx shellway policy reset

Good combinations

  • Office PC: allow only the shared work folder, block deletes, backups on.
  • Developer laptop: allow your code folder, block "shutdown", keep commands on so builds and tests work.
  • Family computer: start with read-only mode, then file tools only.

More: connect ChatGPT to your computer · all tools.