DIG CLI (dg) is a premium, enterprise-grade command-line tool designed for Flutter developers. It automates your daily workflows with an intuitive Interactive Dashboard and a powerful set of low-level commands. From rebuilding your entire architecture to generating robust boilerplate code, dg is the absolute authority on Flutter project management.
- π¦ Installation & Setup
- β‘ CLI Alias configuration
- π» MacOS Professional Setup
- πͺ Windows Setup
- π§ Ubuntu / Linux Setup
- π₯οΈ The Interactive Dashboard
- π οΈ Full Command Reference
- π Feature Deep Dive
- ποΈ Architecture Standards
- Dart SDK:
>=3.0.0 - Flutter: Ensure
flutteris perfectly configured in your systemPATH.
To globally activate the stable version of the CLI using Dart:
dart pub global activate dig_cliIf you want direct access to the latest, unreleased features, you can install directly from the GitHub repository source path:
dart pub global activate -sgit https://github.com/Digvijaysinh2204/dig_cli.gitThe dig_cli package registers a global alias named dg. Ensure your global pub cache is embedded in your system's PATH. Run this to verify the installation:
dg --versionTo maximize your speed, we highly recommend adding custom aliases to your shell profile (~/.zshrc, ~/.zshenv or ~/.bash_profile):
# Set 'dig' as a main command alias
alias dig='dg'
# Common shortcuts
alias dgm="dg create-module"
alias dgp="dg create-project"
alias dgapk="dg create apk"
alias dgcb="dg clean"
alias dga="dg asset build"After saving, simply run source ~/.zshrc. Now you can instantly scaffold a feature by just typing dgm -n auth!
For a seamless enterprise experience on Mac (M1/M2/M3), ensure your shell environment is strictly configured. We recommend adding these to your ~/.zshenv:
# Locale settings
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Homebrew & Pub Cache
eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH="$PATH:$HOME/.pub-cache/bin"
# Android Studio & Java (Crucial for builds)
export PATH="$PATH:/Applications/Android Studio.app/Contents/MacOS"
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"
export PATH="$JAVA_HOME/bin:$PATH"
# FVM (If using Flutter Version Manager)
export PATH="$PATH:$HOME/fvm/default/bin"To use dg and custom aliases on Windows, add these to your Microsoft.PowerShell_profile.ps1:
# Set path for Global Pub Cache
$env:Path += ";$env:USERPROFILE\.pub-cache\bin"
# Custom Aliases
function dgm { dg create-module @args }
function dgp { dg create-project @args }
function dga { dg asset build @args }Add these to your ~/.bashrc:
# Path for Global Pub Cache
export PATH="$PATH":"$HOME/.pub-cache/bin"
# Custom Aliases
alias dig='dg'
alias dgm='dg create-module'
alias dgp='dg create-project'
alias dga='dg asset build'Run source ~/.bashrc to apply.
The easiest way to use Dig CLI is to simply launch the visual dashboard setup. Forget writing complex arguments; just type:
dgInside the Dashboard:
[1] Build & Release: Auto-generate APKs, App Bundles, and iOS IPAs with smart timestamping.[2] Clean & Repair: Safely wipe CocoaPods, Xcode caches, Gradle, andpub-cache.[3] Signing & Keys: Seamlessly generate SHA1/SHA256 data or automate JKS File setups.[4] Configuration: Fast Asset and Font scaffolding setup.[5] Project Management: Download GetX boilerplates directly from GitHub or rebrand an existing app.
If you prefer scripting or CI/CD pipelines, use the headless terminal commands:
| Command Area | Syntax | Description |
|---|---|---|
| Build System | dg create apk |
Compile a Release APK. Optional -o (dir) and -n (name). |
dg create bundle |
Compile an Android App Bundle (AAB). | |
dg ios |
Complete iOS IPA build pipeline. | |
| Maintenance | dg clean |
Full framework reset (CocoaPods, Xcode, builds). |
dg pub-cache |
Runs intensive flutter pub cache repair. |
|
| Keys/Security | dg create-jks |
Generate & hook a secure Android keystore cleanly. |
dg sha-keys |
Display your Gradle SHA1/SHA256 outputs cleanly. | |
dg hash-key |
Fast Facebook/Google Hash Key generator. | |
| Scaffolding | dg create-project |
Clones our enterprise template mapped directly from GitHub. |
dg create-module |
Fully scaffolds a modular GetX setup. | |
| Asset Engine | dg asset build |
Generates strict type-safe assets matching dig.yaml. |
dg asset watch |
Real-time Daemon analyzing asset injections. | |
| System | dg rename |
Renames Android/iOS Display Name & Global Bundle IDs. |
dg zip |
Compress project without garbage files (.gitignore safe). |
dg create-project
This command pulls the absolute latest production template from https://github.com/Digvijaysinh2204/dig_template, overrides standard Flutter configurations, generates Secure ENV keys natively, handles Android Keystore linking immediately, and integrates GetX logic out of the box.
dg create-module --name auth_screenCreates AuthScreenView, AuthScreenController, AuthScreenBinding, registers them natively into AppRoute.authScreen, and auto-exports the module. We parse all internal casing dynamically!
dg asset buildParses all localized PNG/SVG/TTF graphics and outputs generated paths. You can instantly start writing SvgPicture.asset(BottomBarSvg.home); without any fear of naming typos.
By using DIG CLI, you automatically adopt industry-leading architectural norms:
- Feature-First: All screens operate inside dedicated
module/bundles entirely abstracted from external logic. - Dependency Injections: Automated
Bindinglinking via routes prevents memory leaks and manages GetX lifetimes natively. - Secure Handling: Debug logic separates
key.propertiesfrom Git environments automatically.
- Author: Digvijaysinh Chauhan
- License: MIT
"Efficiency through Automation."