Bash (Claude Code)
Tool : A precise action the AI can call · requires claude-code
Executes shell commands in a persistent session.
Essential and dangerous: use pattern-based allowlists, never --dangerously-skip-permissions outside a container.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
Bash is the built-in Claude Code tool that executes shell commands directly in your environment within a persistent session. It addresses the need to run scripts, builds, tests, or any command-line operation without leaving the working context.
In practice, Claude Code submits a command to your machine's shell and retrieves the output to incorporate it into the conversation. The session is persistent: environment variables, the current directory, and launched processes remain active across commands. A set of read-only commands runs without asking for your approval; all others trigger a permission prompt in Manual mode.
This tool is aimed at developers who want to delegate automation, build, or command-line debugging tasks to Claude. It suits those who know their environment well enough to define precise permission rules.
It is not suitable for non-technical users or contexts where running arbitrary commands on the host machine poses an unacceptable risk without prior isolation.
What it offers
- ·Executes shell commands in a persistent session that retains environment variables and the current directory between calls.
- ·Applies permission rules by command pattern using allow, deny, and ask formats in permission settings.
- ·Runs a built-in set of read-only commands without prompting, even in Manual mode.
- ·Integrates with PreToolUse and PostToolUse hooks to intercept or log each call before or after execution.
- ·Accepts rules such as Bash(npm run *) to allow or block specific families of commands.
- ·Can be restricted or extended via --allowedTools and --disallowedTools options in the CLI or Agent SDK.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- claude-code
- Host
- claude-code
- FR interface
- No
Security and data
- Rating
- Security: serious reservations
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data stays local
- Maintenance
- Active
Links and repository checked on 25 October 2026 · added on 1 February 2025
How to install Bash (Claude Code)
permissions.allow: ["Bash(git *)","Bash(npm test)"]