Permission types for controlling agent access to files and commands
~/.cursor/cli-config.json
(global) or <project>/.cursor/cli.json
(project-specific).
Shell(commandBase)
Controls access to shell commands. The commandBase
is the first token in the command line.
Example | Description |
---|---|
Shell(ls) | Allow running ls commands |
Shell(git) | Allow any git subcommand |
Shell(npm) | Allow npm package manager commands |
Shell(rm) | Deny destructive file removal (commonly in deny ) |
Read(pathOrGlob)
Controls read access to files and directories. Supports glob patterns.
Example | Description |
---|---|
Read(src/**/*.ts) | Allow reading TypeScript files in src |
Read(**/*.md) | Allow reading markdown files anywhere |
Read(.env*) | Deny reading environment files |
Read(/etc/passwd) | Deny reading system files |
Write(pathOrGlob)
Controls write access to files and directories. Supports glob patterns.
Example | Description |
---|---|
Write(src/**) | Allow writing to any file under src |
Write(package.json) | Allow modifying package.json |
Write(**/*.key) | Deny writing private key files |
Write(**/.env*) | Deny writing environment files |
**
, *
, and ?
wildcards