Skip to content

Command Reference

Complete reference for all MobileCtl commands.

Overview

MobileCtl provides a unified CLI with four main commands:

CommandDescription
versionManage app version numbers
buildBuild Android and iOS apps
deployDeploy to app stores and distribution platforms
changelogGenerate and manage changelogs

Global Options

These options work with all commands:

OptionDescription
--help, -hShow help for command
--versionShow MobileCtl version

Command Structure

All commands follow this structure:

bash
mobilectl <command> [subcommand] [arguments] [options]

Examples

bash
mobilectl version show
mobilectl version bump patch --dry-run
mobilectl build android production release
mobilectl deploy firebase --interactive
mobilectl changelog generate --append

Common Options

Many commands share these common options:

Verbosity

OptionDescription
--verbose, -vEnable verbose output
--quiet, -qSuppress non-essential output

Dry Run

OptionDescription
--dry-runShow what would be done without executing

Confirmation

OptionDescription
--confirm, -ySkip confirmation prompts (for CI/CD)

Quick Reference

Version Commands

bash
mobilectl version show                    # Show current version
mobilectl version bump <level>            # Bump version (major/minor/patch)
mobilectl version restore [backup]        # Restore from backup

Build Commands

bash
mobilectl build <platform> [flavor] [type]   # Build app
mobilectl build android                      # Build Android (auto-detect)
mobilectl build ios                          # Build iOS
mobilectl build all                          # Build both platforms

Deploy Commands

bash
mobilectl deploy [platform] [destination]    # Deploy app
mobilectl deploy firebase                    # Deploy to Firebase
mobilectl deploy testflight                  # Deploy to TestFlight
mobilectl deploy --interactive               # Interactive mode
mobilectl deploy --all-flavors               # Deploy all flavors

Changelog Commands

bash
mobilectl changelog generate              # Generate changelog
mobilectl changelog show                  # Show current changelog
mobilectl changelog update                # Update existing changelog
mobilectl changelog restore [backup]      # Restore from backup

Command Details

version

Manage your app's version number with semantic versioning support.

Full version command reference →

bash
# Show current version
mobilectl version show

# Bump patch version (1.0.0 → 1.0.1)
mobilectl version bump patch

# Bump minor version (1.0.0 → 1.1.0)
mobilectl version bump minor

# Bump major version (1.0.0 → 2.0.0)
mobilectl version bump major

# Preview without making changes
mobilectl version bump patch --dry-run

# Restore from backup
mobilectl version restore

build

Build your Android and iOS apps with automatic configuration detection.

Full build command reference →

bash
# Build Android with auto-detection
mobilectl build android

# Build specific flavor and type
mobilectl build android production release

# Build iOS
mobilectl build ios

# Build all platforms
mobilectl build all

# Preview build without executing
mobilectl build android --dry-run

deploy

Deploy your apps to Firebase, TestFlight, Play Console, and App Store.

Full deploy command reference →

bash
# Interactive deployment
mobilectl deploy --interactive

# Deploy to Firebase
mobilectl deploy firebase

# Deploy to TestFlight
mobilectl deploy testflight

# Deploy all flavors
mobilectl deploy --all-flavors

# Deploy with version bump and changelog
mobilectl deploy --bump-version patch --changelog

changelog

Generate beautiful changelogs from your git commit history.

Full changelog command reference →

bash
# Generate changelog
mobilectl changelog generate

# Preview without saving
mobilectl changelog generate --dry-run

# Generate and append to existing
mobilectl changelog generate --append

# Generate from specific tag
mobilectl changelog generate --from-tag v1.0.0

# Show current changelog
mobilectl changelog show

Exit Codes

MobileCtl uses standard exit codes:

CodeMeaning
0Success
1General error
2Invalid command or arguments
3Configuration error
4Build error
5Deploy error

Use in scripts:

bash
mobilectl build android
if [ $? -eq 0 ]; then
  echo "Build successful"
else
  echo "Build failed"
  exit 1
fi

Environment Variables

MobileCtl respects these environment variables:

VariableDescription
MOBILECTL_CONFIGPath to config file (default: mobileops.yaml)
MOBILECTL_KEY_PASSWORDAndroid keystore password
MOBILECTL_STORE_PASSWORDAndroid store password
ANDROID_HOMEAndroid SDK location
JAVA_HOMEJava SDK location

Configuration

All commands read from mobileops.yaml by default. You can specify a different config file:

bash
mobilectl --config custom-config.yaml build android

See the Configuration Reference for details.

Examples

Complete Release Workflow

bash
# 1. Bump version
mobilectl version bump minor

# 2. Generate changelog
mobilectl changelog generate

# 3. Build all platforms
mobilectl build all

# 4. Deploy to all destinations
mobilectl deploy --all-flavors

One-Command Deploy

bash
mobilectl deploy \
  --bump-version patch \
  --changelog \
  --all-flavors \
  --confirm

CI/CD Pipeline

bash
# GitHub Actions example
mobilectl deploy firebase \
  --confirm \
  --verbose \
  --skip-build

Getting Help

Command-Specific Help

bash
mobilectl version --help
mobilectl build --help
mobilectl deploy --help
mobilectl changelog --help

Subcommand Help

bash
mobilectl version bump --help
mobilectl changelog generate --help

Next Steps

Explore detailed documentation for each command:

Or check out:

Released under the MIT License.