basemodo run
Run a one-off command inside an App's Machine (a migration, a script).
basemodo run [OPTIONS] <COMMAND>...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...(required): The command to run in the App's Machine.--app <APP>: The App to run it in. Default: the one named after the current folder.--timeout <SECONDS>: How long it may run, in seconds (at most 900). Default:60.
Like every command, it also takes the global options --json and --api-url.
Examples
Run a migration:
basemodo run "npm run migrate"Look at the App's disk (several arguments after -- are one command):
basemodo run -- ls -la /dataRun a long import, for up to 10 minutes:
basemodo run --timeout 600 "python import.py"Output
With --json, it prints {"command", "exit_code" (null when it timed out), "timed_out", "stdout", "stderr"}; while it runs, {"event": "output", "stream", "text"} lines on stderr.
From an agent
The local MCP serves it as the tool run. It changes things, so an agent's client may ask you before it runs. Its arguments are the command's, named as JSON keys: command (list of text), app (text), timeout (number). It answers what the command prints with --json.