πŸš€ flutter_distribute_manager

pub package license: MIT Dart

Build, package and ship your Flutter app to QA in a single command. Android APK + iOS IPA β†’ uploaded to Google Drive and Diawi automatically. No OAuth setup. No manual Xcode archiving. No copy-pasting files into shared folders.

$ flutter_distribute_manager
━━ flutter_distribute_manager ━━
  Project : my_app v1.4.2

? Which platform do you want to build?
  1) Android (APK)
  2) iOS (IPA)
  3) Android + iOS

βœ” Built   my_app_UAT_2026_06_19_0930_arm64-v8a.apk  (24 MB)
βœ” Uploaded to Google Drive
πŸ”— https://drive.google.com/…

✨ Why use it?

πŸ“¦ One command, both platforms flutter build apk --split-per-abi and flutter build ipa handled for you.
☁️ Google Drive uploads Powered by rclone β€” no Google OAuth app to register.
🍏 Diawi install links iOS QA gets a single tap-to-install URL.
πŸ—‚ Auto-organised files Lands in Folder/App/Year/Month/ENV/App_ENV_YYYY_MM_DD_HHmm.ext. Re-runs never create duplicate folders.
🌱 Environments built in DEV / UAT / PROD tagged into file names and passed to the build as --dart-define=ENV=….
πŸ” Resilient uploads Automatic retry with backoff and a live [β–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘] 64% Β· ETA 6s progress bar.
πŸ”” Team notifications Post a build summary to Slack / Discord / any webhook.
πŸ€– CI/CD ready Every prompt has a flag. --yes = zero prompts, --json = machine-readable, --dry-run = preview only.

πŸ“₯ Install

dart pub global activate flutter_distribute_manager

Then make sure the global bin is on your PATH (add to ~/.zshrc or ~/.bashrc):

export PATH="$PATH":"$HOME/.pub-cache/bin"

Verify:

flutter_distribute_manager --version
flutter_distribute_manager --help

⚑ Quick start (3 steps)

# 1️⃣  One-time setup β€” installs rclone, connects Google Drive, saves your Diawi token
flutter_distribute_manager init

# 2️⃣  Make sure everything is wired up correctly
flutter_distribute_manager doctor

# 3️⃣  From inside your Flutter project β€” build & ship
cd path/to/your/flutter_app
flutter_distribute_manager

That's it. The tool detects your project, prompts for platform + environment, builds, uploads, and prints the share links.


🧭 Commands

Command What it does
flutter_distribute_manager Build & ship (default, interactive).
flutter_distribute_manager init One-time setup: rclone, Google Drive auth, Diawi token.
flutter_distribute_manager doctor Health check: tools, config, Drive connectivity (+ macOS Gatekeeper).
flutter_distribute_manager config View, edit, or reset saved configuration.

🚩 Build flags

Flag Alias Description
--platform -p android, ios, or both.
--app-dir -d Flutter project path (default: current dir).
--app-name -n Label used in artifact file names.
--environment -e DEV, UAT, or PROD.
--team-id -t Apple Developer Team ID (iOS).
--scheme Xcode scheme (default Runner).
--flavor Build flavor passed through to flutter build.
--flutter-path Explicit Flutter executable (overrides PATH/fvm detection).
--clean Run flutter clean before building.
--export-method development, release-testing, app-store.
--diawi-token Diawi API token (overrides saved).
--upload-drive Upload artifacts to Google Drive.
--upload-diawi Upload the iOS IPA to Diawi.
--notify-url Slack / Discord / generic webhook to notify after a ship.
--retry Upload attempts before giving up (default 3).
--[no-]split-per-abi Split Android APKs per ABI (default on).
--skip-build / --upload-only Reuse the last build.
--dry-run Print the plan without building or uploading.
--json Emit a machine-readable JSON result on stdout.
--yes -y Assume defaults; never prompt (CI/CD).
--quiet -q Silence non-essential output (build chatter, detail lines).
--verbose -v Verbose logging.
--version Print version.

πŸ€– CI/CD example

Run fully non-interactive β€” perfect for GitHub Actions, GitLab CI, Codemagic, etc.:

flutter_distribute_manager \
  --platform both \
  --environment UAT \
  --app-name MyApp \
  --upload-drive \
  --yes

Add --json to capture the result programmatically:

flutter_distribute_manager --platform android -e UAT --upload-drive --yes --json

πŸ—‚ How files land on Google Drive

Flutter Builds/
└── MyApp/
    └── 2026/
        └── June/
            β”œβ”€β”€ DEV/
            β”œβ”€β”€ UAT/
            β”‚   └── MyApp_UAT_2026_06_19_0930_arm64-v8a.apk
            └── PROD/

Folder matching is case-insensitive, so re-runs reuse the same folders instead of creating duplicates.


βš™οΈ Configuration

Scope Location Stores
Machine ~/.config/flutter_distribute_manager/config.json
(%APPDATA%\flutter_distribute_manager\config.json on Windows)
rclone remote, Drive folder, Diawi token.
Project .flutter_distribute_manager.json in the project root last platform, app name, Team ID, scheme, export method, environment.

βœ… Requirements

  • Flutter & Dart SDKs (Dart β‰₯ 3.5).
  • rclone β€” installed for you by init, used for Google Drive uploads.
  • macOS + Xcode β€” required for iOS builds.
  • Diawi account & API token β€” optional, only for iOS install links.

🎯 fvm-pinned projects

If your app is pinned with fvm, you don't need a global flutter on your PATH. The tool detects fvm (.fvmrc, .fvm/, or .fvm/fvm_config.json) and runs the project's pinned SDK via fvm flutter … automatically β€” so builds use the exact version your project expects.

  • doctor reports Flutter (fvm 3.x.x) βœ” when it resolves via fvm.
  • Override detection anytime with --flutter-path /path/to/flutter.

πŸ”’ Exit codes (for CI)

Code Meaning
0 Success.
64 Bad command-line usage.
69 Upload failed (rclone / Diawi), or a build is already running.
70 The build itself failed.
78 Missing/invalid configuration (Flutter not found, Drive not set up).

🀫 Quieter output

On the first run right after dart pub global activate, pub recompiles the snapshot and its binstub (dart pub -v global run) may leak FINE: / SLVR: / IO : pub log lines to stdout. This comes from pub's bootstrap, not this tool, and disappears on subsequent runs.

Pass --quiet (-q) to silence non-essential output (streamed build chatter and detail lines); errors, warnings, and the final summary still print. Use --json when you need clean, machine-readable stdout.


🧩 Programmatic use

The building blocks are also exported as a library:

import 'package:flutter_distribute_manager/flutter_distribute_manager.dart';

final project = FlutterProject.detect(Directory.current.path);
final artifacts = await AndroidBuilder(const ProcessRunner(), Logger())
    .build(project!, environment: ReleaseEnvironment.uat);

See example/ for a full walkthrough.


πŸ“„ License

MIT Β© 2026 Ashutosh Tripathi

Libraries

flutter_distribute_manager
flutter_distribute_manager β€” a professional CLI that builds, packages and ships Flutter apps (Android APK / iOS IPA) to QA, with Google Drive uploads via rclone, Diawi install links and team notifications.