dig_cli 1.6.1 copy "dig_cli: ^1.6.1" to clipboard
dig_cli: ^1.6.1 copied to clipboard

A powerful command-line tool to automate building, cleaning, and packaging Flutter projects.

๐Ÿ› ๏ธ DIG CLI #

A powerful Flutter CLI tool to automate building, cleaning, packaging, and renaming your projects across all platforms.

pub package MIT License


๐Ÿš€ Features #

  • Interactive Menu: Easy navigation; run the tool without commands for a guided experience.
  • โœจ Create Project: Bootstrap a "Proper" Flutter Project (v1.5.0 Standard) with:
    • Dynamic App Name: Auto-injects your app name into AppConstant and AndroidManifest.
    • Download Manager: Pre-configured GetxService for robust background downloads & localization.
    • JKS Automation: Auto-generates unique keystores and configures signing.
    • Secure Defaults: Generates cryptographically secure API keys in .env.
    • Asset Generation: Pre-configured with subfolder-based asset structure.
  • ๐Ÿท๏ธ Rename App: Smart renaming for Android, iOS, macOS, Windows, Linux, and Web.
    • Handles Android namespace updates and directory restructuring.
    • Updates bundle IDs and display names across all platform-specific files.
  • ๐Ÿ—๏ธ Create Module: Automated GetX scaffolding (View, Controller, Binding, Export) with auto-route registration.
  • ๐ŸŽจ Asset Generation: Subfolder-based asset organization
    • dg asset build - Generate once
    • dg asset watch - Auto-regenerate on changes
    • Folder structure determines class names: assets/bottom_bar/svg โ†’ BottomBarSvg
    • Smart extension handling prevents redundancy
    • Skip/exclude folders via dig.yaml configuration
    • Single import: import 'package:app/generated/assets.dart'
    • See ASSET_GENERATION_GUIDE.md for examples
  • ๐Ÿ›ก๏ธ Build Tools: Release builds with automatic ProjectName-YYYY-MM-DD naming.
  • Deep Clean: Removes Flutter, Gradle, Xcode, and Pods caches on macOS, Windows, and Linux.
  • Auto Update Check: Checks for new versions on pub.dev (Latest: v1.6.1).

๐Ÿ“ฆ Installation #

dart pub global activate dig_cli

After installation, use dg as the command.


โš™๏ธ Usage #

dg

Direct Commands #

  • Create Project: dg create-project
  • Create Module: dg create-module auth (or dg create-module -n auth)
  • Rename App: dg rename --name "New Name" --bundle-id com.new.id
  • Build APK: dg create apk
  • Build AAB: dg create bundle
  • Clean Project: dg clean
  • Create ZIP: dg zip
  • Generate Assets: dg asset build
  • Watch Assets: dg asset watch
  • Show Version: dg --version

๐Ÿงช Examples #

# Rename app and bundle identifier (All Platforms)
dg rename --name "Awesome App" --bundle-id com.my.awesome.app

# Build an APK with a custom name
dg create apk --name MyApp --output ~/Downloads

# Deep clean the project's build artifacts
dg clean

# Generate assets with subfolder-based classes
dg asset build
# Creates: BottomBarSvg, IconsSvg, FontsInterTtf, etc.

Asset Generation Example #

// Folder: assets/bottom_bar/svg/home.svg
import 'package:your_app/generated/assets.dart';
import 'package:flutter_svg/flutter_svg.dart';

SvgPicture.asset(BottomBarSvg.home);

// Folder: assets/fonts/inter/bold.ttf
Text('Hello', style: TextStyle(fontFamily: FontsInterTtf.bold));

For detailed examples, see ASSET_GENERATION_GUIDE.md


๐Ÿ–ฅ๏ธ Platform-specific Setup (Alias) #

By default, use dg in your terminal. If you prefer a custom command name (alias), you can set it up easily:

macOS & Linux #

# Add this to ~/.zshrc or ~/.bashrc
alias df="dg"

Windows (PowerShell) #

Set-Alias df dg

๐Ÿ“ License #

Licensed under the MIT License.

Made with โค๏ธ by Digvijaysinh Chauhan

  • Check out my Flutter packages on pub.dev
6
likes
0
points
991
downloads

Publisher

unverified uploader

Weekly Downloads

A powerful command-line tool to automate building, cleaning, and packaging Flutter projects.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

ansicolor, archive, args, http, path, pub_semver, yaml

More

Packages that depend on dig_cli