Overview
Theruntools execute command runs code in sandboxed environments directly from your terminal. Supports inline code, file execution, stdin, sessions, and JSON output for scripting.
Basic Usage
Options
| Flag | Description | Default |
|---|---|---|
-l, --lang <language> | Programming language (required) | - |
-c, --code <code> | Inline code to execute | - |
-f, --file <path> | File to execute | - |
-s, --stdin <input> | Standard input | - |
--stdin-file <path> | Read stdin from file | - |
--session <id> | Session ID to reuse a persistent sandbox | - |
-t, --timeout <ms> | Run timeout in milliseconds | 300000 |
-v, --version <ver> | Language version | latest |
--json | Output as JSON | - |
-q, --quiet | Only output stdout (no metadata) | - |
Sessions
Use--session to reuse a sandbox across multiple executions. The session ID is shown in the output after each execution:
Language IDs
| Language | ID | Aliases |
|---|---|---|
| Python | python | py, python3 |
| JavaScript | javascript | js, node |
| TypeScript | typescript | ts |
| Bash | bash | sh |
| C | c | gcc |
| C++ | c++ | cpp, g++ |
| Go | go | golang |
| Ruby | ruby | rb |
| Rust | rust | rs |
| Java | java | jdk |
| C# | csharp | cs, dotnet |
Examples
Python
File Execution
JSON Output (for scripting)
Quiet Mode (for piping)
Compiled Languages
List Available Runtimes
Exit Codes
Theexecute command exits with code 0 if the executed code succeeds (exit code 0), or code 1 if the code fails or an error occurs. This makes it compatible with shell scripting and CI/CD pipelines.