flutterchi 1.0.0 copy "flutterchi: ^1.0.0" to clipboard
flutterchi: ^1.0.0 copied to clipboard

A powerful CLI tool to automate Flutter builds. Create APK, App Bundle, and Windows EXE with simple commands. Automatically saves to Desktop.

example/example.md

Flutterchi Examples #

Basic Usage #

1. Check Environment #

Before using Flutterchi, check your Flutter installation:

flutterchi check

Expected output:

🚀 Flutterchi - Flutter Build Automation Tool
============================================================

🔍 Checking environment...

✅ Flutter found: flutter

📋 Running flutter doctor...

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.0, on macOS 13.0)
[✓] Android toolchain - develop for Android devices
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.85.0)
[✓] Connected device (3 available)

✅ Environment check complete!

2. Build APK #

Navigate to your Flutter project and build an APK:

cd my_flutter_app
flutterchi apk

Output:

🚀 Flutterchi - Flutter Build Automation Tool
============================================================

📱 Building APK...

⏳ Cleaning...
✅ Cleaning completed

⏳ Getting packages...
✅ Getting packages completed

⏳ Building APK (this may take a while)...
Running Gradle task 'assembleRelease'...
✅ Building APK completed

📁 Saved: C:\Users\user\Desktop\FlutterBuilds\my_flutter_app_v1.0.0.apk
📊 Size: 18.5 MB

🎉 APK successfully built!
📍 Location: C:\Users\user\Desktop\FlutterBuilds
📦 File: my_flutter_app_v1.0.0.apk

3. Build App Bundle #

flutterchi bundle

or

flutterchi aab

4. Build Windows EXE (Windows only) #

flutterchi exe

5. Build All Formats #

Build APK, App Bundle, and Windows EXE in one command:

flutterchi all

Output:

🚀 Flutterchi - Flutter Build Automation Tool
============================================================

🚀 Building all formats...

============================================================

1️⃣  Building APK

📱 Building APK...
[APK build output...]
🎉 APK successfully built!

============================================================

2️⃣  Building App Bundle

📦 Building App Bundle...
[AAB build output...]
🎉 App Bundle successfully built!

============================================================

3️⃣  Building Windows EXE

💻 Building Windows EXE...
[EXE build output...]
🎉 Windows EXE successfully built!

============================================================

🎊 All builds completed successfully!

📂 All files: C:\Users\user\Desktop\FlutterBuilds

Advanced Usage #

Understanding Output Structure #

After building, your files will be organized like this:

Desktop/
└── FlutterBuilds/
    ├── my_app_v1.0.0.apk           # Android APK
    ├── my_app_v1.0.0.aab           # Android App Bundle
    └── my_app_v1.0.0_windows/      # Windows executable folder
        ├── my_app.exe              # Main executable
        ├── flutter_windows.dll     # Flutter runtime
        └── [other DLLs and data]   # Supporting files

File Naming Convention #

Files are automatically named based on your pubspec.yaml:

name: my_awesome_app
version: 2.1.0+5

Results in:

  • my_awesome_app_v2.1.0.apk
  • my_awesome_app_v2.1.0.aab
  • my_awesome_app_v2.1.0_windows/

Workflow Example #

Complete workflow for releasing a new version:

# 1. Update version in pubspec.yaml
# version: 1.0.0 -> 1.0.1

# 2. Check environment
flutterchi check

# 3. Build all formats
flutterchi all

# 4. Files are ready in Desktop/FlutterBuilds/
# - Upload APK to Play Store Internal Testing
# - Upload AAB to Play Store Production
# - Distribute EXE to Windows users

Common Scenarios #

Scenario 1: First Time Setup #

# Install Flutterchi
dart pub global activate flutterchi

# Verify installation
flutterchi check

# Navigate to project
cd my_project

# Build APK
flutterchi apk

Scenario 2: Quick Release Build #

cd my_project
flutterchi all
# ☕ Take a coffee break
# All builds will be ready in Desktop/FlutterBuilds

Scenario 3: Android Only #

cd my_project
flutterchi apk      # For testing
flutterchi bundle   # For Play Store

Scenario 4: Troubleshooting #

# Check Flutter
flutter doctor

# Check Flutterchi can find Flutter
flutterchi check

# If issues persist, try manual Flutter commands first
flutter clean
flutter pub get
flutter build apk

# Then try Flutterchi again
flutterchi apk

Integration with CI/CD #

GitHub Actions Example #

name: Build with Flutterchi

on:
  push:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3
    
    - uses: subosito/flutter-action@v2
      with:
        flutter-version: '3.10.0'
    
    - name: Install Flutterchi
      run: dart pub global activate flutterchi
    
    - name: Build APK
      run: flutterchi apk
    
    - name: Upload APK
      uses: actions/upload-artifact@v3
      with:
        name: app-release
        path: build/app/outputs/flutter-apk/app-release.apk

Tips and Tricks #

1. Quick Version Check #

Check what will be built without building:

cat pubspec.yaml | grep version

2. Clean Before Important Builds #

flutter clean
flutterchi all

3. Verify Build Output #

cd ~/Desktop/FlutterBuilds
ls -lh

4. Test APK Immediately #

# After building APK
adb install ~/Desktop/FlutterBuilds/myapp_v1.0.0.apk

Need Help? #

1
likes
0
points
241
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful CLI tool to automate Flutter builds. Create APK, App Bundle, and Windows EXE with simple commands. Automatically saves to Desktop.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

args, path, yaml

More

Packages that depend on flutterchi