Permissions
Understanding and configuring the permission system
Ripperdoc includes a permission system to protect against unintended operations.
How Permissions Work
By default, Ripperdoc prompts for approval before:
- Executing shell commands
- Editing or writing files
- Running potentially destructive operations
When a permission prompt appears, you can:
- y/yes: Allow the operation
- n/no: Deny the operation
- a/always: Always allow this type of operation
- Esc: Deny the operation
YOLO Mode
Skip all permission prompts with YOLO mode:
ripperdoc --yoloWarning: Use YOLO mode only in trusted environments where you're comfortable with the AI making changes without confirmation.
Permission Configuration
Permissions are configured in project-level files:
.ripperdoc/config.json- Main project configuration.ripperdoc/config.local.json- Local overrides (gitignored)
Configuration Schema
{
"allowed_tools": ["Read", "Glob", "Grep", "LS", "Edit", "Bash"],
"working_directories": ["/path/to/allowed/dir"],
"bash_allow_rules": [
{
"pattern": "npm test",
"description": "Allow running tests"
},
{
"pattern": "git status",
"description": "Allow git status"
}
],
"bash_ask_rules": [
{
"pattern": "terraform *",
"description": "Always ask before terraform"
}
],
"bash_deny_rules": [
{
"pattern": "rm -rf /",
"description": "Prevent destructive commands"
}
]
}Configuration Fields
| Field | Description |
|---|---|
allowed_tools | List of tools the AI can use |
working_directories | Directories where operations are allowed |
bash_allow_rules | Rules to auto-approve bash commands |
bash_ask_rules | Rules to always prompt before bash commands |
bash_deny_rules | Rules to auto-deny bash commands |
Rule Pattern Syntax
Rules use glob-style patterns:
npm test- Exact matchnpm *- Prefix match*test*- Contains matchgit @(status|diff|log)- Multiple alternatives
Rule Precedence
When multiple rules match, precedence is:
- deny
- ask
- allow
Example Configurations
Development Project
{
"allowed_tools": ["Read", "Glob", "Grep", "LS", "Edit", "Write", "Bash"],
"working_directories": ["."],
"bash_allow_rules": [
{"pattern": "npm *", "description": "Allow npm commands"},
{"pattern": "git *", "description": "Allow git commands"},
{"pattern": "python *", "description": "Allow python commands"}
],
"bash_deny_rules": [
{"pattern": "rm -rf /*", "description": "Prevent recursive delete from root"}
]
}Read-Only Analysis
{
"allowed_tools": ["Read", "Glob", "Grep", "LS"],
"bash_allow_rules": [
{"pattern": "ls *", "description": "Allow listing"},
{"pattern": "cat *", "description": "Allow reading"}
]
}Read-Only Operations
Some operations are automatically allowed as read-only:
Glob- Finding filesGrep- Searching contentRead- Reading filesLS- Listing directories- Shell commands:
ls,cat,head,tail,grep,find(without redirects)
Sandbox Mode
The Bash tool supports sandbox mode for read-only shell operations:
{
"command": "ls -la",
"sandbox": true
}Sandbox mode:
- Prevents filesystem writes
- Blocks network access
- Runs without permission prompts
Working with Sensitive Directories
Ripperdoc will prompt for confirmation when accessing sensitive directories:
/usr,/etc,/bin,/sbin- System configuration directories
- Other user home directories
Managing Permissions
Use the /permissions command to view and manage permissions (interactive UI when available):
> /permissions
> /permissions tui
> /permissions list
> /permissions add allow Bash "npm *"
> /permissions add ask Bash "terraform *"
> /permissions remove local ask "terraform *"Local Configuration Override
Use .ripperdoc/config.local.json for local-only settings that shouldn't be committed:
{
"bash_allow_rules": [
{"pattern": "docker *", "description": "Local docker access"}
],
"bash_ask_rules": [
{"pattern": "kubectl *", "description": "Always ask before kubectl"}
]
}Add .ripperdoc/config.local.json to your .gitignore.
Best Practices
- Start with defaults: Use the default permission system until you understand your workflow
- Allow specific commands: Create allow rules for frequently used safe commands
- Deny dangerous patterns: Explicitly deny patterns like
rm -rf / - Use ask rules for risky tools: Require confirmation for sensitive commands
- Use sandbox for exploration: Use sandbox mode when exploring unfamiliar codebases
- Review before YOLO: Only use YOLO mode after reviewing what Ripperdoc will do
- Use local config: Put personal/machine-specific rules in
config.local.json