Global commands
modal-devin init
OUTPOSTS_DIR. In an interactive terminal, omitted inputs are prompted for. In scripts and CI, NAME is required.
Arguments and options
string
Human-readable Devin Outposts outpost name. It is also available as
--name.string
default:"https://api.beta.devinenterprise.com"
Base Devin API URL. It must be an absolute HTTP or HTTPS URL without credentials, a query string, or a fragment.
string
default:"devin-outposts-token"
Name of the Modal Secret attached to both
generated functions. The Secret must expose
DEVIN_OUTPOSTS_TOKEN containing the
key for a dedicated, admin-scoped Enterprise service user.path
default:"outposts"
Directory for the generated Python file. Parent directories are created as needed.
boolean
Deploy or skip deployment after generation. The wizard prompts in interactive use;
non-interactive use skips deployment when this option is omitted.
Output filename
The name becomes a safe lowercase Python module stem:- Non-ASCII-alphanumeric and non-underscore runs become
_. - Leading and trailing underscores are removed.
- A name beginning with a digit gains the
outpost_prefix. - A name with no ASCII letter or digit is rejected.
Frontend / Prod becomes outposts/frontend_prod.py.
Interactive setup
Depending on answers and existing state, the wizard may:- Run
modal setupand create an outpost throughPOST /opbeta/outpostson the Devin Outposts API. - Create a named Modal Secret directly through the Modal SDK.
- Write the generated application and optionally deploy it with Modal.
Setup safety
initrefuses to overwrite an existing output file.- It validates the output path before creating remote resources.
- If setup cannot finish, it reports any remote resource that may require cleanup.
Examples
modal-devin deploy
rolling strategy so active session invocations drain
on their existing application version instead of being terminated by the update.
path
Generated or handwritten Modal outpost application to deploy. Omit it to deploy
every
*.py file found directly in --outposts-dir instead.path
default:"outposts"
Directory to scan for outpost files when
OUTPOST-FILE is omitted.modal-devin. A failed Modal deployment produces a nonzero exit status.
When deploying a single file:
modal-devin destroy
destroy permanently stops each selected Modal application and deletes its Devin
outpost. Stopping a Modal application immediately terminates its running containers,
including active session invocations.
path
Generated or handwritten Modal outpost application to tear down. Omit it to use
every
*.py file found directly in --outposts-dir.path
default:"outposts"
Directory to scan for outpost files when
OUTPOST-FILE is omitted.boolean
default:"false"
Skip the destructive-action confirmation. This option is required when stdin or
stdout is not an interactive terminal.
DEVIN_OUTPOSTS_TOKEN to an admin-scoped Enterprise service user key before
running non-interactively. Interactive use prompts for the key if the environment
variable is absent. The command reads each file’s literal Worker.from_env(...)
arguments without executing the file, then:
- Stops the matching deployed Modal app. An app that is not deployed is already in the desired state.
- Deletes the Devin outpost only after the Modal app was stopped or found absent.
destroy succeeds.
modal-devin doctor
string
default:"devin-outposts-token"
Modal Secret name to verify.
path
default:"outposts"
Directory to scan for outpost files to check for a matching deployed Modal app.
The last check reads each outpost file’s
Worker.from_env(...) call to determine its
expected Modal app name, without executing the file, and looks it up with
modal.App.lookup. Files whose app name cannot be determined statically (for example,
heavily hand-edited files) print a warning instead of failing.
doctor has no local Devin CLI prerequisite: init creates the outpost directly,
and only the deployed worker image needs the Devin CLI at runtime.