run
Run a one-off command inside an App's Machine (a migration, a script).
The tool of basemodo run, on the local MCP and the remote one. It changes things, so an agent's client may ask you before it runs.
It runs where the App's data is: with its volume at /data (its database at /data/app.db) and the environment its processes started with at its latest Deploy, Secrets included. One argument is a shell line run with sh -c ("npm run migrate && echo done"); several are quoted into one. Its output is printed as it comes, and the CLI exits with its exit code (124 when it ran past --timeout). A sleeping App is woken to run it.
Arguments
command(list of text, required): The command to run in the App's Machine.app(text): The App to run it in. Default: the one named after the current folder.timeout(number): How long it may run, in seconds (at most 900). Default:60.
On the remote MCP
appis required on the remote MCP, which has no folder of yours to find the App from.
Answer
It answers {"command", "exit_code" (null when it timed out), "timed_out", "stdout", "stderr"}; while it runs, {"event": "output", "stream", "text"} lines on stderr. Run by an agent (an MCP tool), it waits for the command at most 45 seconds, as deploy does, so no client cuts the call; the command runs on, within its own timeout, whatever the call answers. One still running then is a result, not an error: what it printed so far, "running": true, its "id" and "next", which says to call runs with that id until it ends. Never run the same command again while it runs: it would run twice (the same command still running is refused with code run_still_running).