Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Command Line Interface

This page lists every proton_cli command and its options. Application IPC commands are documented separately in Commands. Configuration file fields are defined in project configuration.

Invocation and global options

proton_cli [--cwd <directory>] <command> [options]
OptionMeaning
-C, --cwd <directory>Working directory; default .; available to subcommands
-h, --helpHelp for the selected command
-V, --versionCLI version; equivalent in purpose to version

--config, --moon-target-dir and the doctor report path are resolved from the selected working directory. dev --frontend-path and package icon/output paths are resolved from the project configuration directory. Paths in a project configuration are resolved from that file; frontend.dist uses the frontend directory. Explicit command options override the corresponding configuration values.

Command index

CommandPurpose
helpShow command help
versionPrint CLI version
newCreate an application project
devBuild and run an application in development mode
buildBuild frontend assets and the native backend
packageBuild and assemble distribution artifacts
doctorReport environment and project diagnostics
cef setupInstall the release-matched runtime and helper
cef requirementsPrint the embedded CEF requirement
updater public-keyValidate and format a trusted updater public key

help

proton_cli help [command] [subcommand]

Displays help without executing the selected command. For example, proton_cli help cef setup describes runtime installation; it does not install anything. proton_cli <command> --help is the equivalent option form.

version

proton_cli version

Prints proton_cli <version>. It accepts no command-specific options and does not perform the update check.

new

proton_cli new [path] [options]

Creates project source files. Without --yes, interactive prompts are used outside CI. The defaults below apply when no prompt or explicit option overrides them.

Argument / optionDefault and meaning
[path]todo; destination directory
--template <name>isomorphic; accepts minimal or isomorphic
--title <text>Derived from the project directory name; application/window title
--author <name>username; MoonBit module author
--identifier <id>dev.proton.<normalized-project-name>; reverse-DNS application identifier
--width <pixels>960; positive integer
--height <pixels>640; positive integer
--check, --no-checkCheck enabled by default; runs moon check --target js,native after creation
--git, --no-gitExplicitly enable/disable Git initialization; non-interactive default does not initialize Git
-y, --yesSkip prompts and accept defaults
--dry-runPrint planned files without writing them

minimal creates a native module with inline HTML. isomorphic creates shared, frontend and backend modules. Invalid identifiers, nonpositive dimensions and unsupported template names are rejected.

dev

proton_cli dev [options] [-- <application-arguments>...]

Builds and runs the native backend. When a frontend command is configured, it starts that command, waits for readiness and supplies the development URL to the application. Backend changes require a rebuild/restart; frontend refresh is owned by the frontend tool.

OptionDefault and meaning
--config <path>Project configuration; defaults to proton.project.json in the working directory
--package <selector>Overrides the configured backend package; fallback app
--moon-target-dir <path>Override the internal Moon invocation's output directory
--url <url>Override frontend.dev_url
--command <command>Override frontend.before_dev
--frontend-path <path>Override the frontend command's working directory
--timeout-ms <milliseconds>30000; frontend readiness timeout
--ready-path <path>Use an HTTP readiness probe at this path; otherwise checks TCP connectivity
--no-frontendDo not start a frontend command; use an externally managed server
--setup, --no-setupAutomatic installation of missing runtime/helper; disabled by default
-- <arguments>...Arguments for the application, not for Moon

A CLI-managed frontend requires a command and rejects an already occupied development endpoint. HTTP probing requires curl. A readiness timeout prevents application launch. The CLI owns the frontend process it starts; an external server has a separate lifetime.

build

proton_cli build [options] [-- <moon-build-arguments>...]

Runs the configured frontend build, validates frontend output, then builds the native backend. A failed frontend command prevents the backend build. The result is build output, not a complete distribution.

OptionDefault and meaning
--config <path>Project configuration; defaults to proton.project.json in the working directory
--package <selector>Overrides the configured backend package; fallback app
--moon-target-dir <path>Override the internal Moon build's output directory
--no-frontendSkip the frontend build command; does not generate missing frontend assets
-- <arguments>...Forward to moon build, e.g. -- --release

The backend target is always native. A forwarded --target override is rejected.

package

proton_cli package [options]

Builds and assembles the application, frontend assets, CEF runtime, matching helper and declared resources for the host platform. A project configuration is required. This command does not accept trailing Moon arguments.

OptionDefault and meaning
--config <path>Project configuration; defaults to proton.project.json
--package <selector>Override backend package
--releaseUse release build output; otherwise debug
--dry-runResolve and print the plan without executing the full build/package flow
--product-name <name>Override package.product_name
--version <version>Override application version; does not select a Proton version
--format <format>Repeatable; app, zip, dmg, nsis, appimage, subject to host support
--output <directory>Override output directory
--icon <path>Repeatable; override configured icons
--url-scheme <scheme>Repeatable; override configured URL schemes
--nsis-install-mode <mode>currentUser, perMachine or both; overrides Windows configuration
--macos-minimum-system-version <version>Override package.platforms.macos.minimum_system_version
--signSign the application; disabled by default
--notarizemacOS signing, notarization and stapling; implies --sign
--updater-base-url <https-url>Emit update metadata using this artifact base URL; requires publication instant and revision
--updater-published-at <instant>Publication instant in YYYY-MM-DDTHH:MM:SSZ; requires base URL
--updater-revision <integer>Monotonic release sequence embedded in the app and update metadata

CLI lists such as --format override configured lists. Application identity comes from the top-level configuration identifier; package has no --identifier option. --release does not imply signing. A successful dry run does not verify artifact creation or runtime behavior. See packaging for platform formats, configuration defaults and resource rules.

Signing environment

Credentials are environment configuration, not command options.

VariableMeaning
PROTON_MACOS_SIGNING_IDENTITYRequired identity for macOS signing
PROTON_MACOS_ENTITLEMENTSOptional entitlements file
PROTON_MACOS_NOTARY_PROFILEmacOS notary credential profile; PROTON_NOTARY_PROFILE is the fallback
PROTON_MACOS_BUILD_NUMBEROptional bundle version override; one to three numeric components
PROTON_MACOS_ALLOW_ADHOC1 permits ad-hoc signing for local diagnostics
PROTON_WINDOWS_CERTIFICATERequired certificate path for Windows signing
PROTON_WINDOWS_CERTIFICATE_PASSWORDCertificate password; defaults to empty
PROTON_WINDOWS_TIMESTAMP_URLTimestamp service; defaults to http://timestamp.digicert.com; none disables it

doctor

proton_cli doctor [options]

Inspects the environment and current project without installing dependencies or repairing project files. It returns failure when diagnostics fail.

OptionMeaning
--verboseInclude detailed project diagnostics
--jsonRender one JSON document; conflicts with --quiet
--quietRender only failing diagnostics; conflicts with --json
--output <path>Write the report to a file

cef setup

proton_cli cef setup

Installs the CEF runtime and helper selected by this Proton release in the shared user-level stores and prints the runtime root. It accepts no command-specific options, writes no project runtime-selection file and does not select an arbitrary CEF version. Installation requires network access when artifacts are missing.

cef requirements

proton_cli cef requirements

Prints the release's embedded CEF requirement as JSON. It does not install the runtime or inspect an application's running browser. No command-specific options.

updater public-key

proton_cli updater public-key --modulus <hex> [--exponent <hex>]

Validates a trusted RSA public key and prints a comment with its bit length followed by rsa-sha256:<modulus>:<exponent>, suitable for App::update_channel's public_keys.

OptionMeaning
--modulus <hex>Required RSA modulus; accepts the Modulus= prefix produced by OpenSSL
--exponent <hex>Public exponent; default 010001 (65537)

Surrounding whitespace is trimmed and hexadecimal is normalized to lowercase. The runtime's key parser validates the key, including modulus size and exponent. This command does not generate a key pair, read PEM files, sign artifacts or publish updates.

Exit status and update checks

StatusMeaning
0Command succeeded
1Execution failed, or diagnostics reported failure
2Argument parsing failed

Commands other than version perform a best-effort CLI update check. PROTON_NO_UPDATE_CHECK=1 disables it. An unavailable update service does not prevent the command from running.