Commands
Run modvc help for the built-in overview ormodvc help <command> for command-specific help where available. Detailed help is implemented for deploy, apps, status, logs, env, config, and rebuild; other commands show the general overview. Slot arguments can be omitted when the CLI can resolve a default target.
| Command | Purpose | Usage |
|---|---|---|
modvc help | Print general help or the detailed help for one command. | modvc help [command] |
modvc init | Run the interactive project setup wizard and write a modvc.json file. | modvc init |
modvc login | Authenticate with a manual API token or browser device authorization. | modvc login [--token <token>] [--force] [--switch] |
modvc logout | Clear the active locally stored token and attempt server-side revocation. | modvc logout |
modvc accounts | List saved account profiles or select one; profiles is an alias. | modvc accounts [list|<email>] |
modvc profiles | Alias for listing or selecting a saved account profile. | modvc profiles [list|<email>] |
modvc switch | Switch to an account profile that is already saved. | modvc switch <email> |
modvc whoami | Show the authenticated account, plan, and token information. | modvc whoami [--json] |
modvc apps | List the account application slots and their status. | modvc apps [--json] |
modvc status | Show the status and runtime details for a slot. | modvc status [slot] [--json] |
modvc start | Start an application container. | modvc start [slot] |
modvc stop | Stop an application container. | modvc stop [slot] |
modvc restart | Restart an application container. | modvc restart [slot] |
modvc logs | Read recent runtime logs or follow the live log stream. | modvc logs [slot] [--tail <lines>] [--follow] |
modvc env | List, update, remove, upload, or download environment variables. | modvc env <list|set|unset|push|pull> [slot] [arguments] |
modvc files | List files in a slot, read, download, or write remote file content. | modvc files [slot|read|cat|download|write|edit] [arguments] |
modvc pull | Download a whole slot as a ZIP or pull one remote file to a local path. | modvc pull [slot] [remote-path] [--output <local-path>] |
modvc rebuild | Request a clean rebuild using the current project settings. | modvc rebuild [slot] [--runtime <name>] [--build <command>] [--start <command>] |
modvc config | Read or update a slot runtime, start command, build command, or name. | modvc config [slot] | modvc config set [slot] <key> <value> |
modvc deploy | Archive the current project directory, upload it, and start a deployment. | modvc deploy [slot] [options] |
modvc open | Open the public URL for a slot in the default browser. | modvc open [slot] |
modvc link | Save a default slot target in the current project directory. | modvc link [slot] |
modvc doctor | Check the local setup, Node.js version, and API connectivity. | modvc doctor |
modvc update | Download and install the latest CLI release after integrity checks. | modvc update |
Command groups
modvc env
modvc env list [slot]modvc env set [slot] KEY=VALUEmodvc env unset [slot] KEYmodvc env push [slot] [file]modvc env pull [slot] [file]
modvc files
modvc files [slot]modvc files read [slot] <path>modvc files cat [slot] <path>modvc files download [slot] <remote-path> [--output <local-path>]modvc files write [slot] <remote-path> [content] [--file <local-path>]modvc files edit [slot] <remote-path> [content] [--file <local-path>]
Download a remote file
Download one remote file from a slot, including binary files. The default destination is the remote file's basename in the current directory; use--output to choose a different local path.
modvc files download 1 src/image.png
modvc files download 1 src/image.png --output ./image.pngThe parent directory for the destination must already exist. Existing files require confirmation before replacement; pass --yes to allow the replacement without a prompt. In non-interactive use, pass --yeswhen the destination already exists. This command requires theapps:read scope.
Pull a slot or one remote file
With no remote path, modvc pull saves the selected slot as a ZIP archive in the current directory. With a remote file path, it saves that file's original bytes; with a directory path, it saves that directory as a ZIP. Nothing is extracted into or merged with your current project.
modvc pull 1
modvc pull 1 src/config.json --output ./config.json
modvc pull 1 src --output ./src-export.zipThe whole-slot and directory archives include up to 300 MB of source data and omit environment files, dependency, version-control, cache, and build-output directories. Download an environment file explicitly with files download if needed. Existing output files require confirmation; use --yesin scripts or CI. The parent directory must already exist. To use the default slot, omit the slot or pass it with --app. Pull requires theapps:read scope.
Write content to an app file
Use --file to read UTF-8 content from a local file. Relative local paths are resolved from the current working directory. The remote path is inside the selected app slot.
modvc files write 1 config/settings.json --file ./settings.json
modvc files write config/settings.json --file ./settings.jsonIf --file is supplied, its contents take precedence over positional content. Otherwise, positional content is joined with spaces; if no content is supplied, the CLI writes an empty string. The request must fit the 10 MB API JSON body limit and the slot's remaining storage. A replacement can still be rejected near the quota even when its new content is smaller than the existing file.
Global options
The following options are declared by the CLI parser. A flag only affects commands that use it.
| Option | Short form | Value | Behavior |
|---|---|---|---|
--help | -h | — | Show help; combine with a command for its detailed help. |
--version | -v | — | Print the installed CLI version. |
--app | — | <name|id> | Select an application or slot target. |
--token | — | <token> | Supply an API token directly. |
--api-url | — | <url> | Override the API base URL. |
--allow-custom-host | — | — | Allow requests to a host outside the modcloud host allowlist. |
--json | — | — | Print JSON output where the command supports it. |
--quiet | -q | — | Suppress most informational console output; errors and direct stream output remain visible. |
--yes | -y | — | Skip confirmation prompts. |
--tail | — | <lines> | Set the number of log lines to show; defaults to 200 and has a maximum of 1,000. |
--follow | -f | — | Follow runtime logs continuously. |
--reveal | — | — | Show environment variable values instead of masking them. |
--show | — | — | Show environment variable values instead of masking them. |
--force | — | — | Force a fresh login instead of reusing a valid saved session. |
--switch | — | — | Start a new browser login and make the approved account active. |
--file | — | <path> | Read local UTF-8 content from this file for files write; overrides positional content. |
--output | — | <path> | Choose the local destination path for pull or files download. |
--env | — | <file> | Deploy with an environment file; when omitted, the CLI uses its configured default or .env. |
--build | — | <command> | Override the build command for deploy or rebuild. |
--start | — | <command> | Override the start command for deploy or rebuild. |
--runtime | — | <name> | Override the runtime for deploy or rebuild. |
Quiet output and exit codes
--quiet (or -q) suppresses most messages written with console.log. Aconsole.log call whose first argument containsError or ✗ is still shown, as areconsole.error,console.warn, spinner messages on stderr, and output written directly to stdout (such as file contents and followed logs) can still appear. The device-login code and URL are also printed with console.log, so quiet mode hides them. It also hides --help and--version output when combined with those options.
- Exit code 0: command completed successfully.
- Exit code 1: authentication, API, command execution, or some command-specific usage failed.
- Exit code 2: parser rejection, an unknown command, or invalid env set/unset arguments.