run_command · Run a shell command
may change things: you confirm before it runsRuns a shell command (bash) on a running computer in the background and returns a run id at once. Read its output with read_logs. Long-running servers (npm run dev) keep running until stopped or the session ends; their ports show as preview URLs. Put secrets in env, not in the command text: Desk stores the first 300 characters of the command to list your runs, never env values.
Input schema
{
"type": "object",
"properties": {
"computer": {
"type": "string",
"description": "The computer id from create_computer, like c_ab12cd34ef56.",
"pattern": "^c_[a-z0-9]{12}$"
},
"token": {
"type": "string",
"description": "The computer token from create_computer (ct_...). Not needed when you call with the owner's API key."
},
"command": {
"type": "string",
"description": "Shell command, up to 8000 characters, like \"npm install && npm test\"."
},
"cwd": {
"type": "string",
"description": "Working directory (default: the repo, else ~)."
},
"env": {
"type": "object",
"description": "Environment variables for this run only, like { \"GH_TOKEN\": \"...\" }. Never stored.",
"additionalProperties": {
"type": "string"
}
}
},
"required": [
"computer",
"command"
],
"additionalProperties": false
}