Skip to main content

CLI Overview

The SwiftPatch CLI bundles your JavaScript, uploads it, and creates a live release -- all in one command.

Releases deployed via CLI appear instantly in the dashboard

Quick Start

Step 1: Install

npm install -g @swiftpatch/cli

Step 2: Log in

swiftpatch login

Step 3: Deploy your first update

swiftpatch deploy -p ios --hermes
First deploy?

Run swiftpatch init in your project root first. It creates a config file and links your project to an app in the dashboard.

Hermes is required for most apps

React Native enables Hermes by default since 0.70+. Always add --hermes to compile to bytecode before uploading.

Core Commands

CommandWhat it does
swiftpatch deployBundle, upload, and release an OTA update
swiftpatch initSet up SwiftPatch in your project
swiftpatch loginAuthenticate via browser
swiftpatch logoutClear stored credentials
swiftpatch rollbackRoll back the latest release on a channel
swiftpatch doctorDiagnose configuration issues
swiftpatch generate-key-pairGenerate RSA keys for bundle signing
swiftpatch ci-tokens createGenerate a CI token for pipelines
info

See the full command reference for subcommands covering apps, releases, channels, and configuration.

Authentication

Local development

swiftpatch login

Opens a browser login flow. Your session persists across terminal sessions.

CI/CD pipelines

export SWIFTPATCH_CI_TOKEN=sp_ci_your-token

Or pass it directly:

swiftpatch deploy -p android --hermes --ci-token sp_ci_your-token

Generate tokens with swiftpatch ci-tokens create or from App Settings > API Keys in the dashboard.

tip

Each CI token is scoped to one app, limiting the impact if a token is exposed.

Global Flags

FlagDescription
-a, --app <id>App ID or slug
-p, --platform <ios|android>Target platform
--ci-token <token>CI token for authentication
--helpShow help
--versionShow CLI version

Next Steps

  • Commands -- Full reference for every command and flag
  • CI/CD Guide -- Automate deployments in your pipeline
  • Installation -- Setup, prerequisites, and troubleshooting