Claude bash

by AnthropicCode

The bash tool is Anthropic's tool that lets Claude run shell commands in a session your application keeps alive. Claude asks for a command, your code runs it and returns the output, and the working directory, environment variables and files carry over to the next command until Claude asks for a restart. On Opper it works on the Messages endpoint, on Claude from Anthropic, Vertex and Bedrock alike.

UseClaude bashwithin

Add Claude bash on Opper

Set up with agents

Paste this into your coding agent (Claude Code, Cursor, Codex, and more) and it will set up and build with Opper for you.

Get your API key

Key info

Tool
bash
Endpoint
Messages
Routes
AnthropicVertexBedrock

In your code

curl https://api.opper.ai/v3/compat/v1/messages \
-H "Authorization: Bearer $OPPER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "anthropic/claude-haiku-5-5", "max_tokens": 1024,
"messages": [{"role": "user", "content": "List the files in this repo."}],
"tools": [{"type": "bash_20250124", "name": "bash"}]}'

Use Claude bash with these models

Step-by-step setup for Claude bash on each of these models through Opper.

More tools on Opper

Use Claude bash through Opper

One key, 700+ models, a choice of region, and zero data retention. Tools run in the same request, with every call in your traces.

Get startedView Documentation