Skip to main content

๐Ÿ’ป 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โ€‹

OSShell TypeNotes
WindowsPowerShellVia powershell -NoProfile -NonInteractive -Command
macOSzsh / bashDefaults to zsh
LinuxbashStandard 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โ€‹

ParameterTypeRequiredDescription
commandstringYesThe shell command to execute
approvedbooleanNoSet 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โ€‹

LimitDescription
TimeoutMax 300 seconds, auto-terminates on timeout
Output TruncationOutput exceeding 1MB is auto-truncated
Workspace IsolationCommands execute within the designated workspace directory
Pipe SupportSupports `
RedirectionSupports >, >>, < 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.