๐ป Shell Command Execution
๐ค Who it's for: Developers / DevOps
โฑ๏ธ Read time: ~4 minutes
๐ก In one line: Let AI run system commands in a controlled environment for builds, inspections, and batch operations.
YingClaw can securely execute Shell commands within the workspace, directly bridging AI reasoning with system operations.
Supported Shell Environmentsโ
| OS | Shell Type | Notes |
|---|---|---|
| Windows | PowerShell | Via powershell -NoProfile -NonInteractive -Command |
| macOS | zsh / bash | Defaults to zsh |
| Linux | bash | Standard GNU bash |
Security Mechanismsโ
YingClaw has multiple layers of security to keep command execution safe and controllable:
Auto-Blocked Commandsโ
The following types of commands are automatically blocked:
- Recursive force delete:
rm -rf,rd /s /q,rmdir /s /q - Disk formatting:
format,mkfs - Silent C: drive deletion:
del /f /q C:*,erase /f C: - Registry modification:
reg add,reg delete - Sub-shell injection: Backtick
`, process substitution<(โฆ),>(โฆ)
Approval & Confirmationโ
For medium-risk operations, set approved: true to explicitly authorize execution.
Use Casesโ
- ๐ System Diagnostics: Check CPU, memory, disk, network status
- ๐๏ธ Build & Deploy: Execute compilation, packaging, deployment scripts
- ๐ Batch File Processing: Bulk rename, format conversion, archiving
- โ Environment Verification: Validate dependencies, versions, configurations
Parametersโ
| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | Yes | The shell command to execute |
approved | boolean | No | Set to true to explicitly approve medium/high-risk commands |
Examplesโ
Example 1: List Filesโ
> List all .md files in the current directory
YingClaw executes: ls *.md (or dir *.md on Windows)
Example 2: System Infoโ
> Show CPU usage and memory status
YingClaw runs the appropriate system command and returns results.
Example 3: Run a Scriptโ
> Run build.sh, requires approval
YingClaw requests confirmation before execution, runs after user approval.
Execution Limitsโ
| Limit | Description |
|---|---|
| Timeout | Max 300 seconds, auto-terminates on timeout |
| Output Truncation | Output exceeding 1MB is auto-truncated |
| Workspace Isolation | Commands execute within the designated workspace directory |
| Pipe Support | Supports ` |
| Redirection | Supports >, >>, < I/O redirection |
Notesโ
- Commands execute within the workspace directory and won't affect critical system paths
- Output exceeding 1MB is truncated โ redirect large output to files instead
- Avoid commands requiring interactive input (e.g.
vim,ssh) - Handle errors when using pipes to avoid silent failures
Next Stepsโ
Now that you know Shell execution, continue to ๐ File Operations to master file I/O.