dig_cli
A powerful developer CLI and automation companion for Flutter projects. Automates asset path indexing, code generation, keystore creation, build pipelines, and project scaffolding.
β‘ Features
- π¨ Asset Generation: Automatically discovers and indexes images, SVGs, and fonts into type-safe Dart classes.
- π± Build Automation: Fast shortcuts for compiling release APKs, Android App Bundles (AAB), and iOS IPAs.
- π Keystore & Security: Interactive JKS keystore generator and SHA1/SHA256 fingerprint extraction.
- π§Ή Deep Clean: Safely clears CocoaPods, Gradle, Xcode build artifacts, and repairs the Pub cache.
- π₯οΈ Interactive Terminal Dashboard: Launch
dgwith no arguments for a visual terminal menu.
π¦ Installation
Activate dig_cli globally using Dart:
dart pub global activate dig_cli
Verify that the CLI executable dg is available in your system PATH:
dg --version
π₯οΈ Interactive Dashboard
Simply run dg in any Flutter project root to open the interactive menu:
dg
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DIG CLI β
β Flutter Developer Automation Engine β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[1] π Build & Release (APK, AAB, iOS)
[2] π§Ή Clean & Repair (Pods, Gradle, Cache)
[3] π Signing & Keys (JKS, SHA1/SHA256)
[4] π¨ Asset Indexer (Type-Safe Assets)
[5] π¦ Project Scaffolding
[0] πͺ Exit
π οΈ CLI Command Reference
| Command | Description |
|---|---|
dg |
Launches the interactive dashboard |
dg create apk |
Compiles a release APK with optional output directory |
dg create bundle |
Compiles an Android App Bundle (AAB) for Google Play |
dg ios |
Runs the iOS build pipeline |
dg asset build |
Generates type-safe asset references from assets directory |
dg asset watch |
Watches assets directory and updates references in real time |
dg create-jks |
Generates and configures a release keystore |
dg sha-keys |
Displays SHA-1 and SHA-256 fingerprints |
dg clean |
Cleans Flutter build artifacts, CocoaPods, and Gradle cache |
dg pub-cache |
Performs a deep repair on the pub cache |
π Asset Indexing Example
Define your asset paths in pubspec.yaml or dig.yaml, then run:
dg asset build
This generates type-safe constants in lib/generated/assets.dart:
// Auto-generated by DIG CLI
class AppAssets {
AppAssets._();
static const String logo = 'assets/images/logo.png';
static const String banner = 'assets/images/banner.png';
}
π€ Part of DHC Tech Packages Monorepo
dig_cli is maintained under the dhc-tech/flutter-packages monorepo.
Contributions, issues, and feature requests are welcome at the GitHub Issues page.
π€ Author
Maintained by DHC Tech.
π License
This project is open-source and licensed under the MIT License.