rn-ota-bundler
v1.0.15
Published
OTA Bundler for React Native Multi-Bundle
Readme
rn-ota-bundler
OTA Bundler CLI for React Native Multi-Bundle. This tool helps you bundle, obfuscate (optional), zip, and upload your React Native modules for Over-The-Air updates.
Installation
npm install -D rn-ota-bundler
# or
yarn add -D rn-ota-bundlerUsage
You can run it directly using npx:
npx rn-ota-bundler <command> [options]Commands
Authentication
login
Login via browser and save JWT token locally.
npx rn-ota-bundler loginlogout
Clear saved JWT token.
npx rn-ota-bundler logoutModule & Environment Management
variants
List or add variants (environments).
# List variants
npx rn-ota-bundler variants
# Add new variant
npx rn-ota-bundler variants --add <name>modules
List or add modules.
# List modules
npx rn-ota-bundler modules
# Add new module
npx rn-ota-bundler modules --add <name>Bundling & Release
bundle
Create local bundle zip (no upload).
Options:
-m, --module <name>: Module name (e.g., homepage)-p, --platform <platform>: Platform (ios|android)--obfuscate: Enable obfuscation (default: false)--build <type>: Build all modules (e.g., "all")
Examples:
# Build single module
npx rn-ota-bundler bundle -m homepage -p android --obfuscate
# Build all modules
npx rn-ota-bundler bundle --build allrelease
Create local bundle zip and upload to server.
Options:
-m, --module <name>: Module name (required)-p, --platform <platform>: Platform (ios|android) (required)--obfuscated: Is bundle obfuscated (default: true)
Example:
npx rn-ota-bundler release -m homepage -p iosedit-bundle
Edit bundle properties release.
Arguments:
<id>: Bundle ID
Options:
--min-app <ver>: Min app version--max-app <ver>: Max app version--version <ver>: Bundle version--install-mode <mode>: Install mode (immediate|next_restart)--active <bool>: Set active status (true|false)--environment-ids <ids>: Comma separated environment IDs--rollback-delay <hours>: Rollback retry delay in hours--rollback-retry <count>: Rollback max retry attempts
Example:
npx rn-ota-bundler edit-bundle 123 --active true --min-app 1.0.0Bundle Management
history
List app history (release history per platform/version).
npx rn-ota-bundler historybundles
List remote bundles with optional filters.
Options:
-id, --bundleId <id>: Filter by bundle ID-m, --module <name>: Filter by module-v, --variant <name>: Filter by variant-p, --platform <platform>: Filter by platform
Example:
npx rn-ota-bundler bundles -m homepage -p androidversions
List or add local app versions.
Options:
--add <version>: Add a new app version
Example:
npx rn-ota-bundler versions --add 1.0.1Features
- Bundling: Uses standard
react-native bundlecommand. - Obfuscation: Supports
javascript-obfuscatorifobfuscator.config.jsonis present in the root directory. - Versioning: Auto-detects app version from
build.gradle(Android) orInfo.plist/project.pbxproj(iOS). - Zipping: Automatically zips the bundle and assets into a deploy-ready file.
- OTA Management: Full suite of commands to manage modules, variants, and releases via CLI.
Project Structure Expectation
The tool expects your project to have:
src/<module_name>/index.jsas the entry point.- Standard React Native structure (
android/,ios/) for version detection.
Configuration
The CLI uses a configuration file located at ~/.rn-ota-bundler/config.json.
Default base URL: http://localhost:3000 (can be overridden in src/default-config.json before build).
License
ISC
