Execute Bash scripts instantly in a secure, isolated sandbox. No server access needed — test your shell scripts safely online.
Bash is the default shell on most Linux and macOS systems, essential for shell scripting, automation, DevOps pipelines, and system administration. It provides powerful text processing, file manipulation, and process management capabilities.
Our sandbox runs Bash 5.2 with common GNU utilities available.
Open a session once, then call execute repeatedly — variables, files, and installed packages persist between runs. Perfect for code interpreters and REPL-style agents.
# 1. Create a session curl -X POST https://api.sandboxapi.dev/v1/sessions \ -H "X-RapidAPI-Key: $KEY" \ -d '{"language":"bash","idle_ttl":300}' # → {"id":"sess_abc","language":"bash",...} # 2. Execute — first call curl -X POST https://api.sandboxapi.dev/v1/sessions/sess_abc/execute \ -H "X-RapidAPI-Key: $KEY" \ -d '{"code":"export X=42"}' # 3. Execute again — state carries over curl -X POST https://api.sandboxapi.dev/v1/sessions/sess_abc/execute \ -H "X-RapidAPI-Key: $KEY" \ -d '{"code":"echo $((X * 2))"}'
Integrate secure code execution into your own apps with our REST API. Free tier includes 500 executions per month.
Get API Key on RapidAPI