Shell Access Toolset#
Generated byAIThis toolset provides tools for executing shell commands within the current project directory.
shell_command#
Executes one of the allowed shell commands within the current project’s root directory and returns the shell command’s output.
Heads up! The tool tries to err on the side of caution and detect and prompt you for confirmation even when you’ve approved commands but built-in (and custom) restricted strings are detected. Regardless, you and only you are responsible for the outcome of any commands run via this tool.
Parameters#
command(String, required): The shell command(s) to execute. Multiple commands can be supplied separated by supported delimiters.
Tool Settings#
The allowed and approved command lists can be pre‑configured in the config file under the tool_settings: section:
tool_settings:
shell_command:
allowed_commands: [ ... ]
approved_commands: [ ... ]Supported properties#
-
allowed_commands- An array of executable names that are permitted.
- If unset, falls back to the
ENKAIDU_ALLOWED_EXECUTABLESenvironment variable (space‑separated). - Defaults to
ls cat grep whoami file wc findwhen not set.
-
approved_commands- An array of executables that can run without user confirmation.
- If not set, falls back to the
ENKAIDU_APPROVED_EXECUTABLESenvironment variable (space‑separated). - Defaults to an empty list.
-
restricted_terms- Additional strings that, when present anywhere in the command, require user confirmation
- If not set, checks
ENKAIDU_RESTRICTED_TERMSenvironment variable or a config entry. - The following OS‑specific terms are always included (checking is case insensitive):
- Windows:
RM,DEL,EVAL,FOR,--EXPRESSION,-E,-E=,|,; - Unix:
RM,EVAL,$(,--EXPRESSION,-E,-E=,|,;
- Windows:
Notes#
-
Forbidden strings:
- On Unix the characters
&,<,>,..are forbidden. - On Windows
&is allowed (it separates commands), while..,<and>remain forbidden.
- On Unix the characters
-
Multi‑command splitting:
- An internal platform-specific regex is used to split commands in case there are multiple
- Each split command is checked for safety
-
Safety checks:
- Commands must start with one of the allowed executables (exact match or followed by a space).
- It must not contain any forbidden substrings (
..,<,>,&on Unix). - Commands that include any restricted terms or that are not approved require user confirmation before execution.
- The tool raises
PermissionErrorif the user denies the confirmation, andSafetyErrorfor unsafe commands.