dig_cli

pub package Dart License: MIT Monorepo

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 dg with 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.

Libraries