Skip to content

Bash

The Bash tool allows the AI to execute shell commands directly on your machine. This gives it the ability to run scripts, manage files, install packages, query system state, and much more.

  • Executes shell commands in your default shell (bash/zsh)
  • Returns stdout and stderr output to the AI
  • Runs in the conversation’s working directory, or in a private scratch folder for that conversation when none is set
  • Keeps long output available, so the AI can refer back to it in later turns

The AI uses Bash when:

  • You ask it to run a script or command
  • File operations are faster via shell than with Read/Glob
  • You need system information (disk usage, running processes, etc.)
  • You want to install packages, compile code, or manage Git repos

“Check how much disk space my Downloads folder is using, and list the 5 largest files.”

The AI will run du -sh ~/Downloads and find ~/Downloads -type f | xargs ls -lS | head -5 (or similar), then format the output in a readable way.

How much Bash can do without asking depends on the conversation’s permission mode:

  • Ask and Auto: commands run inside the OS sandbox (macOS Seatbelt, Linux bubblewrap) where one is available. The sandbox keeps writes to the allowed folders and blocks network access until you approve it. In Ask mode, commands without a sandbox are confirmed before they run.
  • Yolo: commands run with your full user permissions, without the sandbox.

In every mode:

  • Catastrophic commands, such as erasing the disk, are blocked.
  • The AI cannot read ChatShell’s own data folder, and it asks before reading shell configuration files.
  • Commands start with a minimal environment. Choose extra variables to pass through in Settings → Permissions.

You are always shown the exact command being run before and after execution.

  • You can tell ChatShell to use a specific directory: “Run this in my project folder at ~/projects/myapp”