Project Management
Manage your SilverOTA projects using the project command group.
Commands
project list
List all projects in your account.
silverbullet-ota project listExample output:
Projects:
• MyApp (iOS & Android)
ID: proj_abc123
Created: 2024-01-15
• DemoApp (iOS & Android)
ID: proj_def456
Created: 2024-02-20project init
Initialize SilverOTA in your React Native project with an interactive setup wizard.
silverbullet-ota project initThis is the primary command for setting up OTA updates in a new project.
Project Init Wizard
The project init command guides you through a comprehensive setup process.
Step-by-Step Walkthrough
1. Select Build Plugin
Choose between two build plugins:
Bare (React Native CLI)
✔ Select a build plugin › Bare (React Native CLI)- For projects using React Native CLI
- Installs
@silverbullet-ota/bare - Supports Hermes and JSC
Expo
✔ Select a build plugin › Expo- For Expo-managed workflows
- Installs
@silverbullet-ota/expo - Compatible with EAS Build
2. Package Installation
The wizard automatically installs required packages:
Installing packages...
• @silverbullet-ota/react-native
• @silverbullet-ota/bare (or @silverbullet-ota/expo)
✓ Packages installed successfullyThese packages are added to your package.json:
@silverbullet-ota/react-native→dependencies- Build plugin →
devDependencies
3. Select Organization
Choose which organization this project belongs to:
✔ Select an organization › PersonalIf you only have one organization, it's auto-selected.
4. Select or Create Project
Choose an existing project or create a new one:
✔ Select a project
› Create new project
MyApp (iOS & Android)
DemoApp (iOS & Android)If creating new:
✔ Project name … MyNewApp
✔ Project created successfully5. API Key Setup
The wizard manages API keys for the production channel:
Scenario A: No production key exists
No production API keys found. Creating one...
✓ API key created successfullyScenario B: One production key exists
✓ Using existing production API keyScenario C: Multiple production keys exist
✔ Select an API key
› pk_prod_abc123... (Created: 2024-01-15)
pk_prod_def456... (Created: 2024-02-01)6. Configuration File Creation
An ota.config.ts file is created in your project root:
For Bare React Native:
import { configureOTA } from 'silverbullet-ota';
import { bare } from '@silverbullet-ota/bare';
export default configureOTA({
projectId: 'proj_abc123',
apiKey: 'pk_prod_xyz789',
build: bare({ enableHermes: true }),
});For Expo:
import { configureOTA } from 'silverbullet-ota';
import { expo } from '@silverbullet-ota/expo';
export default configureOTA({
projectId: 'proj_abc123',
apiKey: 'pk_prod_xyz789',
build: expo()
});TIP
The wizard auto-detects your iOS Info.plist and Android strings.xml paths using glob patterns.
7. Package Scripts Added
Deployment scripts are added to your package.json:
{
"scripts": {
"silverbullet:deploy:android": "silverbullet-ota deploy --platform android",
"silverbullet:deploy:ios": "silverbullet-ota deploy --platform ios"
}
}Now you can deploy with:
npm run silverbullet:deploy:ios
npm run silverbullet:deploy:android8. .gitignore Updated
The .silverbullet-ota output directory is added to your .gitignore:
# SilverOTA
.silverbullet-ota/This prevents build artifacts from being committed to your repository.
Configuration Details
Auto-Detection
The wizard automatically detects:
iOS Info.plist files:
- Searches in
ios/directory - Excludes
Pods/andbuild/directories - Finds all
Info.plistfiles
Android strings.xml files:
- Searches in
android/app/src/main/res/values/ - Excludes
build/andgenerated/directories
Hermes Detection (Bare React Native)
For bare projects, the wizard checks if Hermes is enabled:
// android/app/build.gradle
enableHermes: trueAnd configures the build plugin accordingly:
bare({ enableHermes: true })After Initialization
Once project init completes, you should:
Configure your React Native app - Add SilverOTA SDK to your app entry point
tsximport { SilverOTA } from '@silverbullet-ota/react-native';Set your channel - Configure which channel your app uses
bashnpx silverbullet-ota channel set productionRebuild your app - Native code changes require a rebuild
bashnpx react-native run-ios # or npx react-native run-androidDeploy your first update
bashnpm run silverbullet:deploy:ios
Re-running Init
If you need to reconfigure your project, you can run project init again. However:
WARNING
Re-running project init will overwrite your ota.config.ts file. If you've made manual changes, back them up first.
Troubleshooting
No Info.plist or strings.xml found
The wizard might not auto-detect files in non-standard locations. You can manually edit ota.config.ts to add the correct paths.