expo-build-bump
v1.0.1
Published
CLI tool to bump version, iOS build number, and Android versionCode in Expo app config files
Maintainers
Readme
🚀 expo-build-bump
A lightweight CLI tool to bump your Expo app's version, iOS build number, and Android versionCode directly inside your app.config.ts, app.config.js, or app.json.
Perfect for automating version management during releases or inside CI/CD pipelines.
✨ Features
✅ Auto-increment or set explicit version numbers
✅ Supports app.config.ts, app.config.js, and app.json
✅ Separate control for iOS and Android builds
✅ Works seamlessly in CI/CD (GitHub Actions, GitLab, Bitrise, etc.)
✅ Supports dry-run and JSON output modes
✅ Input validation to prevent invalid values
✅ Automatic backup creation for safety
✅ Simple flag-based CLI — no configuration required
📦 Installation
Use without installing (recommended)
# Using npx (npm)
npx expo-build-bump
# Using bunx (bun)
bunx expo-build-bumpGlobal install
npm install -g expo-build-bumpOr install in a project
npm install --save-dev expo-build-bumpThen run it with:
npx expo-build-bump⚡ Quick Start
# Bump iOS and Android build numbers (default)
npx expo-build-bump
# Bump version, iOS, and Android all together
npx expo-build-bump --all
# Set specific version
npx expo-build-bump --versionNumber 2.5.10
# Bump only iOS build
npx expo-build-bump --ios
# See what would change without modifying files
npx expo-build-bump --dry-run📖 Usage
🔹 Basic Usage
Auto-increment iOS build and Android versionCode (default):
npx expo-build-bumpIncrement only the app version:
npx expo-build-bump --versionNumberIncrement only iOS build number:
npx expo-build-bump --iosIncrement only Android versionCode:
npx expo-build-bump --androidIncrement everything:
npx expo-build-bump --all🔧 Setting Explicit Values
Set a specific app version:
npx expo-build-bump --versionNumber 2.5.10Set iOS and Android build numbers explicitly:
npx expo-build-bump --ios 45 --android 120🧠 Flags & Options
| Flag | Alias | Description |
| ------------------------- | ----- | ------------------------------------------------- |
| --versionNumber [x.x.x] | -v | Increment or set app version |
| --buildNumber | -b | Increment both iOS & Android builds (legacy flag) |
| --ios [n] | -i | Increment or set iOS build number |
| --android [n] | -a | Increment or set Android versionCode |
| --all | -A | Update version + iOS + Android all together |
| --config <path> | -c | Specify a custom config file path |
| --json | -j | Output changes as JSON (great for CI/CD) |
| --quiet | -q | Suppress console logs (useful in pipelines) |
| --dry-run | -d | Show what would change, but don't write to file |
| --help | -h | Show help info |
🧩 Examples
Increment iOS and Android builds (default)
npx expo-build-bumpOnly bump Android build number
npx expo-build-bump --androidSet exact version and builds
npx expo-build-bump --versionNumber 1.5.2 --ios 30 --android 45Run in dry-run mode (no file changes)
npx expo-build-bump --all --dry-runGet JSON output (useful for CI)
npx expo-build-bump --jsonExample JSON output:
{
"file": "app.config.ts",
"version": "2.5.10",
"iosBuild": 45,
"androidCode": 120
}⚙️ CI/CD Integration
Example: GitHub Actions
name: Bump App Version
on:
push:
branches:
- main
jobs:
bump-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Bump version & build
run: npx expo-build-bump --all --json > bump.json
- name: Show new versions
run: cat bump.json
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add app.config.*
git commit -m "chore: bump version [skip ci]"
git pushExample: GitLab CI
bump-version:
stage: deploy
script:
- npx expo-build-bump --all
- git add app.config.*
- git commit -m "chore: bump version [skip ci]"
- git pushExample: Using with Bun
# Install bun if you haven't
curl -fsSL https://bun.sh/install | bash
# Run with bunx
bunx expo-build-bump --all🧪 Example Outputs
CLI Output (default):
Version and build numbers upgraded in app.config.ts:
Version: 2.5.10
iOS Build Number: 45
Android Version Code: 120Dry-Run Mode:
Version and build numbers upgraded in app.config.ts:
Version: 2.5.10
iOS Build Number: 45
Android Version Code: 120
(Dry run mode: no file was written)JSON Output (--json flag):
{
"file": "app.config.ts",
"version": "2.5.10",
"iosBuild": 45,
"androidCode": 120
}🛡️ Safety Features
- Input Validation: Validates version format (semver) and build numbers (positive integers)
- Automatic Backups: Creates temporary backup before writing, removes on success
- Change Detection: Only writes file if content actually changed
- Failure Warnings: Shows warnings if fields couldn't be found or updated
- Error Handling: Graceful error messages for file read/write issues
📂 Supported Config Files
The tool automatically detects and works with:
app.config.ts(TypeScript)app.config.js(JavaScript)app.json(JSON)
You can also specify a custom config file:
npx expo-build-bump --config ./custom-config.json🧰 Development
Clone and link locally
git clone https://github.com/Subhashish-Mishra/expo-build-bump.git
cd expo-build-bump
npm install
npm linkNow you can use:
expo-build-bumpTest locally without installing
node expo-build-bump.js --help🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
MIT © 2025 Subhashish Mishra
💡 Why expo-build-bump?
Manually editing version numbers in app.config.ts is tedious and error-prone. This tool:
- Saves time: No more manual edits
- Prevents errors: Input validation ensures valid values
- CI/CD ready: Perfect for automated workflows
- Safe: Automatic backups and change detection
- Flexible: Works with all Expo config formats
🧍♂️ Author
Subhashish Mishra
GitHub: @Subhashish-Mishra
🐛 Issues & Support
Found a bug or have a feature request? Please open an issue.
⭐ Show Your Support
If this tool helped you, please consider giving it a star on GitHub!
Happy versioning! 🎉
