Run a shell command in Termux
run_commandExecutes a bash command as the Termux user and returns exit code, stdout, stderr, duration, and truncation flags for automation and diagnostics.
Instructions
Run a command with bash -c as the Termux user and return exit code, stdout, stderr, duration and truncation flags. Use cwd for the working directory and timeout_sec for long jobs. There is no command allow list: the command runs with the full permissions of the Termux user. A non-zero exit code is returned as data, not as a tool failure. For long-running or interactive work use the task_* or terminal_* tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory. Default $HOME. | |
| env | No | Extra environment variables. | |
| stdin | No | Text written to the command standard input. | |
| command | Yes | Shell command to execute with bash -c. | |
| timeout_sec | No | Timeout in seconds. Default 120, max 600. |