Skip to main content
The standard code-interpreter template includes a Bash kernel for shell workflows that should be captured as notebook-style executions.
result = sandbox.run_code("""
pwd
printf 'hello from bash\n'
""", language="bash")

print("".join(result.logs.stdout))
For ordinary process execution, prefer sandbox.commands.run(). Use Bash code interpreter cells when you want the output represented as a code execution with the same callbacks, results, and artifact handling as other interpreter cells.