A CLI tool to automatically increment version numbers for React Native projects
npm install react-native-vbumpA CLI tool to automatically increment version numbers for React Native projects


- 🤖 Android support: Updates versionCode and versionName in build.gradle
- 🍎 iOS support: Updates CURRENT_PROJECT_VERSION and MARKETING_VERSION in project.pbxproj
- 📁 Multiple file support: Configure multiple Android/iOS files via config file
- 👆🏼 Interactive mode: Professional prompts using Inquirer.js
- ✅ Dry-run mode: Preview changes without making modifications
- 🎛️ Granular control: Update specific version components individually
bash
npm install -g react-native-vbump
`$3
`bash
npx react-native-vbump
`$3
`bash
npm install --save-dev react-native-vbump
`📖 Usage
$3
`bash
Run in any React Native project directory
react-native-vbumpOr use the short alias
rnvbUsing npx (no installation required)
npx react-native-vbump
`$3
The tool provides an interactive mode with professional prompts:
1. Auto-detect your React Native project
2. Choose platforms to update (Android, iOS, or both)
3. Select increment type (patch, minor, major)
4. Confirm changes before applying
⚙️ Configuration (Optional)
The tool works out-of-the-box with standard React Native projects. Optionally, create a
vbump.config.js file in your project root to customize file paths:`javascript
export default {
android: {
files: [
'android/app/build.gradle',
'android/library/build.gradle',
// Add more Android modules
]
},
ios: {
files: [
// Auto-detect all .xcodeproj files
'ios/*.xcodeproj/project.pbxproj',
// Or specify explicit paths
'ios/MyApp.xcodeproj/project.pbxproj',
'ios/MyAppExtension.xcodeproj/project.pbxproj'
]
},
packageJson: 'package.json'
};
`Supported config file names:
-
vbump.config.js
- vbump.config.json
- .vbump.config.js
- .vbump.config.json🎯 Auto-Detection
The tool automatically detects React Native projects by:
1. Searching upward from current directory
2. Checking package.json for React Native dependencies
3. Verifying structure (android/ios directories exist)
4. Loading configuration if available
📋 Command Options
| Option | Description |
| --------------------------------- | ------------------------------------------------------------- |
|
-p, --project-path | Path to React Native project (auto-detected if not specified) |
| -c, --config | Path to configuration file |
| -a, --android | Update Android versions only |
| -i, --ios | Update iOS versions only |
| --build-numbers | Update only build numbers (both platforms) |
| --android-build-number [number] | Update only Android build number (versionCode) |
| --android-app-version [version] | Update only Android app version (versionName) |
| --ios-build-number [number] | Update only iOS build number (CURRENT_PROJECT_VERSION) |
| --ios-app-version [version] | Update only iOS app version (MARKETING_VERSION) |
| --increment | Increment type: major, minor, patch (default: patch) |
| --dry-run | Preview changes without applying them |📊 Examples
$3
`bash
Interactive mode with auto-detection
npx react-native-vbumpUpdate both platforms with patch increment
npx react-native-vbump --android --iosPreview changes
npx react-native-vbump --dry-run
`$3
`bash
Update only Android build number
npx react-native-vbump --android-build-numberUpdate only iOS app version
npx react-native-vbump --ios-app-version "2.1.0"Update build numbers for both platforms
npx react-native-vbump --build-numbers
`$3
`bash
Update build numbers for automated builds
npx react-native-vbump --build-numbersUpdate with specific version for release
npx react-native-vbump --android --ios --android-app-version "2.1.0" --ios-app-version "2.1.0"
`$3
`bash
Use custom config file
npx react-native-vbump --config ./build-configs/version.config.jsRun from different directory
npx react-native-vbump --project-path ./my-rn-app
`🔧 Version Logic
- versionCode (Android): Integer build number (e.g., 591 → 592)
- versionName (Android): Semantic version (e.g., "2.12.0" → "2.12.1")
- CURRENT_PROJECT_VERSION (iOS): Integer build number (e.g., 1 → 2)
- MARKETING_VERSION (iOS): Semantic version (e.g., "2.12.0" → "2.12.1")
🛠️ Development
`bash
Clone repository
git clone https://github.com/junedomingo/react-native-vbump.git
cd react-native-vbumpInstall dependencies
npm installRun in development
npm run devBuild for production
npm run buildRun tests
npm test
`📦 Requirements
- Node.js: 20.0.0 or higher
- React Native project with standard structure
- Platform files:
android/app/build.gradle and/or ios/*.xcodeproj/project.pbxproj`Contributions are welcome! Please feel free to submit a Pull Request.