@appspacer/cli
v1.0.0
Published
Professional-grade Over-The-Air (OTA) update CLI for React Native. Deploy JavaScript bundles and assets instantly — no app store review required.
Downloads
20
Maintainers
Readme
AppSpacer CLI
Professional-grade Over-The-Air (OTA) update CLI for React Native. Deploy JavaScript bundles and assets instantly — no app store review required.
AppSpacer CLI lets you bundle, sign, and deploy over-the-air updates to your mobile apps in seconds. It also includes a built-in secrets vault for managing environment variables across teams.
Full documentation: docs.appspacer.com
Installation
npm install -g @appspacer/cliRequirements: Node.js 18 or higher.
Quick Start
# 1. Authenticate
appspacer login -t pat_your_token_here
# 2. Auto-configure your native project (React Native only)
appspacer setup
# 3. Push an OTA update
appspacer release-react-native android -a my-app -d Staging -t 1.0.0Commands
appspacer login
Authenticate with AppSpacer using a Personal Access Token (PAT).
appspacer login -t pat_your_token_here
# Interactive — prompts for token if -t is omitted
appspacer login| Flag | Description |
|------|-------------|
| -t, --token <token> | Personal Access Token (must start with pat_) |
| --api-url <url> | Override the API base URL (for self-hosted deployments) |
Generate tokens at appspacer.com/settings/tokens.
appspacer whoami
Display the currently authenticated user.
appspacer whoamiappspacer setup
Auto-configure native Android and iOS files to load OTA bundles from AppSpacer. Run this once after installing react-native-appspacer.
# Configure both platforms
appspacer setup
# Android only
appspacer setup --android-only
# iOS only
appspacer setup --ios-only
# Preview changes without writing files
appspacer setup --dry-run
# Point to a project in a different directory
appspacer setup --project-dir ../my-app| Flag | Description |
|------|-------------|
| --android-only | Only configure Android |
| --ios-only | Only configure iOS |
| --project-dir <dir> | Root of the React Native project (default: .) |
| --dry-run | Preview injected code without modifying files |
The command auto-detects your React Native architecture (New Architecture / Traditional) and injects the correct bundle resolver into MainApplication.kt / MainApplication.java (Android) and AppDelegate.mm / AppDelegate.swift (iOS). Original files are backed up as .appspacer.bak.
appspacer setup:undo
Remove all AppSpacer injections from native files.
appspacer setup:undo
appspacer setup:undo --project-dir ../my-appappspacer release-react-native
Bundle your React Native JavaScript and push it as an OTA update.
# Android
appspacer release-react-native android -a my-app -d Staging -t 1.0.0
# iOS — mandatory update with a description
appspacer release-react-native ios -a my-app -d Production -t 2.1.0 --mandatory --description "Critical bug fix"
# Include assets (images, fonts) in the bundle
appspacer release-react-native android -a my-app -d Staging -t 1.0.0 --include-assets| Flag | Description |
|------|-------------|
| <platform> | android or ios (required positional argument) |
| -a, --app <id> | App ID or Name (required) |
| -d, --deployment <name> | Deployment name, e.g. Staging, Production (required) |
| -t, --target-version <version> | App store version this update targets, e.g. 1.0.0 (required) |
| --description <text> | Human-readable release notes |
| --mandatory | Mark update as mandatory (applied immediately on next launch) |
| --include-assets | Bundle assets along with JS (increases bundle size) |
appspacer release-flutter
Package your Flutter assets/ directory and push it as an OTA update. Run from your Flutter project root — the app version is read automatically from pubspec.yaml.
# Android
appspacer release-flutter -p android -a my-app -d Staging
# iOS — mandatory
appspacer release-flutter -p ios -a my-app -d Production --mandatory
# With a description
appspacer release-flutter -p android -a my-app -d Staging --description "New onboarding assets"| Flag | Description |
|------|-------------|
| -p, --platform <os> | android or ios (required) |
| -a, --app <id> | App ID or Name (required) |
| -d, --deployment <name> | Deployment name (required) |
| --description <text> | Release notes |
| --mandatory | Mark update as mandatory |
appspacer release
Upload a pre-built zip bundle manually (platform-agnostic).
appspacer release -a my-app -d Staging -p android -t "1.x.x" -f ./bundle.zip| Flag | Description |
|------|-------------|
| -a, --app <id> | App ID or Name (required) |
| -d, --deployment <name> | Deployment name (required) |
| -p, --platform <os> | android or ios (required) |
| -t, --target-version <version> | Target app version (required) |
| -f, --file <path> | Path to the .zip bundle (required) |
| --description <text> | Release notes |
| --mandatory | Mark update as mandatory |
appspacer deployments
List all releases in a deployment.
appspacer deployments -a my-appappspacer rollback
Disable the latest release and reactivate the previous one.
appspacer rollback -a my-app -d Staging -p android
appspacer rollback -a my-app -d Production -p ios| Flag | Description |
|------|-------------|
| -a, --app <id> | App ID or Name (required) |
| -d, --deployment <name> | Deployment name (required) |
| -p, --platform <os> | android or ios (required) |
appspacer vault
Manage and sync environment variables (secrets) via AppSpacer Vault.
# Initialize vault in the current directory (interactive)
appspacer vault init
# Push local .env to the remote vault
appspacer vault push
# Pull secrets from the vault into a local .env file
appspacer vault pull
# Revert the most recent vault change
appspacer vault rollback
# View audit history
appspacer vault auditvault env — Environment management
# List environments in the current project
appspacer vault env list
# Switch the active environment (and pull its secrets)
appspacer vault env use Productionvault secrets — Individual secret management
# List all remote secrets (values masked)
appspacer vault secrets ls
# Set a single secret
appspacer vault secrets set API_KEY=abc123Configuration
AppSpacer CLI stores its configuration (token, API URL) in ~/.appspacer/config.json. No manual editing is required.
Links
- Dashboard: appspacer.com
- Documentation: docs.appspacer.com
- Issues / Support: appspacer.com/support
License
MIT
