Quick Start
Get up and running with MobileCtl in 5 minutes.
Step 1: Install MobileCtl
Clone and build the project:
bash
git clone https://github.com/AhmedNader65/MobileCtl.git
cd MobileCtl
./gradlew buildAdd to your PATH (optional):
bash
export PATH="$PATH:$(pwd)"Step 2: Navigate to Your Project
bash
cd /path/to/your/mobile/projectStep 3: Create Configuration
Create mobileops.yaml in your project root:
yaml
app:
name: MyApp
identifier: com.example.myapp
version: 1.0.0
build:
android:
enabled: true
ios:
enabled: true
version:
enabled: true
current: 1.0.0
filesToUpdate:
- pubspec.yaml
- package.json
changelog:
enabled: trueStep 4: Build Your App
Android
bash
mobilectl build androidOutput:
Building Android app...
✓ Build successful (1m 23s)
Output: android/app/build/outputs/apk/release/app-release.apkiOS
bash
mobilectl build iosBoth Platforms
bash
mobilectl build allStep 5: Manage Version
Show current version:
bash
mobilectl version showBump version:
bash
mobilectl version bump patchOutput:
Version bumped: 1.0.0 → 1.0.1
Updated files:
✓ mobileops.yaml
✓ pubspec.yaml
✓ package.json
Backup created: version-backup-2024-01-15-14-30-00Step 6: Generate Changelog
Create changelog from git commits:
bash
mobilectl changelog generateOutput:
Generating changelog...
Analyzed commits: 24
- Features: 8
- Bug fixes: 10
- Documentation: 4
- Other: 2
✓ Changelog generated: CHANGELOG.md
Backup created: changelog-backup-2024-01-15-14-35-00Step 7: Deploy (Optional)
If you have Firebase or TestFlight configured:
bash
mobilectl deploy firebaseOr use interactive mode:
bash
mobilectl deploy --interactiveComplete Workflow Example
Here's a typical release workflow:
bash
# 1. Bump version
mobilectl version bump minor
# 2. Generate changelog
mobilectl changelog generate
# 3. Build for all platforms
mobilectl build all
# 4. Deploy (if configured)
mobilectl deploy --all-flavorsOr use the all-in-one command:
bash
mobilectl deploy --bump-version minor --changelog --all-flavorsWhat's Next?
Now that you have the basics:
Learn More
- Configuration Guide - Customize your setup
- Build Automation - Advanced build options
- Version Management - Version strategies
- Deployment - Deploy to app stores
Explore Commands
- version command - Full version management
- build command - Build reference
- deploy command - Deployment options
- changelog command - Changelog features
See Examples
Common Tasks
Daily Development
bash
# Build debug version
mobilectl build android debug
# Build staging
mobilectl build android staging release
# Deploy to testers
mobilectl deploy firebase --flavors stagingRelease to Production
bash
# Complete release
mobilectl deploy \
--bump-version minor \
--changelog \
--flavors production \
--confirmHotfix
bash
# Quick patch release
mobilectl version bump patch
mobilectl build all
mobilectl deploy --all-flavors --confirmTips
1. Use Dry Run
Preview what will happen:
bash
mobilectl build android --dry-run
mobilectl version bump patch --dry-run
mobilectl deploy --dry-run2. Use Verbose Mode
Get detailed output for debugging:
bash
mobilectl build android --verbose3. Check Help
Every command has built-in help:
bash
mobilectl --help
mobilectl build --help
mobilectl version bump --help4. Use Backups
MobileCtl automatically creates backups. Restore if needed:
bash
# List version backups
mobilectl version restore
# Restore specific backup
mobilectl version restore version-backup-2024-01-15-14-30-00
# List changelog backups
mobilectl changelog restoreTroubleshooting
Build Fails
bash
# Check configuration
cat mobileops.yaml
# Use verbose mode
mobilectl build android --verbose
# Check build logs
cat android/app/build/reports/...Version Not Updating
Ensure files are listed in config:
yaml
version:
filesToUpdate:
- pubspec.yaml
- package.json
# Add any other files with version numbersDeploy Fails
Check credentials are configured:
yaml
deploy:
android:
firebase:
serviceAccount: credentials/firebase-key.json # Make sure this existsGetting Help
- Documentation: Browse these docs
- Examples: Check examples section
- GitHub Issues: Report bugs
- Command Help: Run
mobilectl <command> --help
Next Steps
Ready to dive deeper?
Happy building! 🚀