CLI Installation
The Swiftpatch CLI ships as swiftpatch-cli on npm. Install globally for convenience, or invoke via npx to avoid a global install.
Requirements
- Node.js 20 or higher.
- npm, yarn, or pnpm.
- For OTA deploys: a bundler-capable environment (Metro ships with every React Native project).
- For iOS deploys: CocoaPods, Xcode command-line tools.
- For Android deploys: Java 17, Android SDK (only needed for local
react-native bundle).
Install globally
npm install -g swiftpatch-cli
Verify:
swiftpatch --version
# swiftpatch-cli 1.x.x
Use via npx
No install required:
npx swiftpatch-cli deploy -p ios --hermes
This is the recommended approach for CI. npx caches the CLI after the first run.
Log in
swiftpatch login
Opens your browser for OAuth. After consent, a token is stored at ~/.swiftpatch/config. The token is encrypted at rest.
Verify:
swiftpatch whoami
# Signed in as prince@example.com (org: swiftpatch)
Upgrade
npm install -g swiftpatch-cli@latest
Release notes live at github.com/swiftpatch/swiftpatch-cli/releases.
Uninstall
npm uninstall -g swiftpatch-cli
Your local ~/.swiftpatch/config persists after uninstall. To wipe it:
rm -rf ~/.swiftpatch