Skip to main content

Command Execution Settings Guide

PicoClaw provides two key settings to control command execution permissions, helping you balance functionality and security.

Overview

SettingConfig PathDefaultDescription
Enable Command Executiontools.exec.enabledtrueGlobally controls whether command execution is allowed
Allow Remote Command Executiontools.exec.allow_remotetrueControls whether remote sessions can execute commands

Enable Command Execution

Description

Controls whether the application is allowed to execute commands. When disabled, all command requests will be rejected.

Configuration

Via configuration file:

{
"tools": {
"exec": {
"enabled": false
}
}
}

Via environment variable:

export PICOCLAW_TOOLS_EXEC_ENABLED=false

Use Cases

ScenarioRecommended Setting
Local-only usageallow_remote: false
Remote channels (Telegram, Discord, etc.) need command executionallow_remote: true
Multi-user remote accessallow_remote: false (more secure)

Security Context

Context TypeDescription
Local trusted contextCommands executed directly in a local terminal or CLI
Remote sessionRequests from Telegram, Discord, WeChat, etc.
Non-local contextHTTP API calls, Webhook triggers, etc.

Combined Usage Examples

Scenario 1: Fully Disable Command Execution

Suitable for high-security, read-only environments:

{
"tools": {
"exec": {
"enabled": false
}
}
}

Effect: All command requests are rejected, both local and remote.

Scenario 2: Allow Local Execution Only

Suitable when local automation is needed but remote command execution is not allowed:

{
"tools": {
"exec": {
"enabled": true,
"allow_remote": false
}
}
}

Effect: Local terminal commands can execute Remote channel requests (Telegram, Discord, etc.) are rejected

Scenario 3: Fully Open (Default)

Suitable for development environments or trusted networks:

{
"tools": {
"exec": {
"enabled": true,
"allow_remote": true
}
}
}

Effect: Both local and remote command execution are allowed.

Working with Other Security Settings

SettingConfig PathDescription
Workspace Restrictionagents.defaults.restrict_to_workspaceLimits command execution paths
Dangerous Command Blockingtools.exec.enable_deny_patternsBlocks dangerous command patterns
Custom Deny Patternstools.exec.custom_deny_patternsAdds custom blocking rules

Complete Security Configuration Example

{
"agents": {
"defaults": {
"restrict_to_workspace": true
}
},
"tools": {
"exec": {
"enabled": true,
"allow_remote": false,
"enable_deny_patterns": true,
"custom_deny_patterns": [
"\\brm\\s+-rf\\b",
"\\bsudo\\b"
]
}
}
}