CLI Installation
Get the CLI installed, authenticated, and ready to deploy in under 5 minutes.
Prerequisites
| Requirement | Minimum Version |
|---|---|
| Node.js | 18.0+ |
| npm / yarn / pnpm | npm 9+, yarn 1.22+, or pnpm 8+ |
| OS | macOS, Linux, or Windows 10+ |
| React Native | 0.70+ (in your target project) |
Step 1: Install the CLI
# npm
npm install -g @swiftpatch/cli
# yarn
yarn global add @swiftpatch/cli
# pnpm
pnpm add -g @swiftpatch/cli
Permission errors?
Do not use sudo. Instead, fix npm permissions or use nvm (Node Version Manager).
Step 2: Verify the installation
swiftpatch --version
You should see output like:
@swiftpatch/cli/1.x.x darwin-arm64 node-v20.x.x
Command not found?
Close and reopen your terminal, then try again.
Step 3: Log in
Option A: Interactive login (local development)
swiftpatch login
Your browser opens to the SwiftPatch login page. After signing in, the CLI stores an encrypted session token locally.

Option B: CI token (automated environments)
export SWIFTPATCH_CI_TOKEN=sp_ci_your-ci-token
Or pass it directly:
swiftpatch deploy -p ios --hermes --ci-token sp_ci_your-ci-token
tip
CI tokens are scoped to one app. Create them from Settings > API Keys in the dashboard. See CI/CD Integration for full setup.
Step 4: Verify authentication
swiftpatch whoami
Expected output:
Logged in as: yourname@company.com
Organization: Your Company
You're all set!
Configuration
Set persistent defaults so you can skip repetitive flags:
swiftpatch config list
swiftpatch config set defaultOrg <org-id>
Updating the CLI
# npm
npm update -g @swiftpatch/cli
# yarn
yarn global upgrade @swiftpatch/cli
# pnpm
pnpm update -g @swiftpatch/cli
Uninstalling
# npm
npm uninstall -g @swiftpatch/cli
# yarn
yarn global remove @swiftpatch/cli
# pnpm
pnpm remove -g @swiftpatch/cli
Next Steps
- CLI Commands -- Full command reference
- CI/CD Integration -- Automate deployments
- Your First Update -- Deploy a bundle