modal app
Manage deployed and running apps.
Usage:
Options:
--help: Show this message and exit.
Commands:
list: List Modal apps that are currently deployed/running or recently stopped.logs: Fetch or stream App logs.rollback: Redeploy a previous version of an App.rollover: Redeploy an App to get new containers without code changes.stop: Permanently stop an App and terminate its running containers.history: Show an App’s deployment history.dashboard: Open an App’s dashboard page in your web browser.
modal app list
List Modal apps that are currently deployed/running or recently stopped.
Usage:
Options:
-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--json / --no-json: [default: no-json]--help: Show this message and exit.
modal app logs
Fetch or stream App logs.
By default, this command fetches the last 100 log entries and exits. Use -f to
live-stream logs from a running App instead. Fetch and follow are mutually exclusive.
Examples:
Get recent logs based on an app ID:
Get recent logs for a currently deployed App based on its name:
Follow (stream) logs from a running App:
Fetch the last 1000 entries:
Fetch logs from the last 2 hours:
Fetch logs in a specific time range:
Filter the logs by source and function:
Include timestamps along with Function and Container IDs on each line:
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID
Options:
-f, --follow: Stream log output until App stops--since TEXT: Start of time range. Accepts ISO 8601 datetime or relative time, e.g. ‘1d’ (1 day ago), ‘2h’, ‘30m’, etc.--until TEXT: End of time range; accepts same argument types as —since-n, --tail INTEGER: Show only the last N log entries--search TEXT: Filter by search text--function TEXT: Filter by Function ID (fu-*)--function-call TEXT: Filter by FunctionCall ID (fc-*)--container TEXT: Filter by Container ID (ta-*)-s, --source TEXT: Filter by source: ‘stdout’, ‘stderr’, or ‘system’--timestamps: Prefix each line with its timestamp--show-function-id: Prefix each line with its Function ID--show-function-call-id: Prefix each line with its FunctionCall ID--show-container-id: Prefix each line with its Container ID-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--help: Show this message and exit.
modal app rollback
Redeploy a previous version of an App.
Note that the App must currently be in a “deployed” state. Rollbacks will appear as a new deployment in the App history, although the App state will be reset to the state at the time of the previous deployment.
Examples:
Rollback an App to its previous version:
Rollback an App to a specific version:
Rollback an App using its App ID instead of its name:
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID[VERSION]: Target version for rollback.
Options:
-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--help: Show this message and exit.
modal app rollover
Redeploy an App to get new containers without code changes.
A rollover replaces existing containers with fresh ones built from the same App version — useful for refreshing containers without changing your code. The rollover appears as a new entry in the App’s deployment history.
Examples:
Rollover an App using a rolling deployment. Running containers are now considered outdated and will be gracefully replaced by new ones.
Rollover an App by terminating any running containers. Inputs on the queue will start new containers.
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID
Options:
--strategy [rolling|recreate]: Strategy for rollover [default: rolling]-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--help: Show this message and exit.
modal app stop
Permanently stop an App and terminate its running containers.
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID
Options:
-y, --yes: Run without pausing for confirmation.-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--help: Show this message and exit.
modal app history
Show an App’s deployment history.
Examples:
Get the history based on an app ID:
Get the history for an App based on its name:
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID
Options:
-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--json / --no-json: [default: no-json]--help: Show this message and exit.
modal app dashboard
Open an App’s dashboard page in your web browser.
Examples:
Open dashboard for an app by name:
Use a specified environment:
Usage:
Arguments:
[APP_IDENTIFIER]: App name or ID
Options:
-e, --env TEXT: Environment to interact with.
If not specified, Modal will use the default environment of your current profile, or the MODAL_ENVIRONMENT variable.
Otherwise, raises an error if the workspace has multiple environments.
--help: Show this message and exit.