Command Reference

FDAWG provides a comprehensive set of CLI commands for managing Flutter projects. All commands follow the pattern:

fdawg [command] [subcommand] [options] [arguments]

Available Commands

Core Commands

Command Description Documentation
serve Start web server for project management Server Commands
init Validate Flutter project structure Server Commands

Project Management Commands

Command Description Documentation
env Environment variable management Environment Commands
asset Project asset management Asset Commands
lang Localization and translation management Localization Commands
namer Cross-platform app naming App Namer Commands
bundler Bundle ID management for all platforms Bundle ID Commands
build Build Flutter applications with comprehensive configuration Build Commands

Quick Examples

Environment Management

# List all environment files
fdawg env list

# Create a new environment
fdawg env create production

# Add a variable
fdawg env add API_URL https://api.example.com --env production

Asset Management

# Add an asset
fdawg asset add path/to/image.png

# Migrate assets to organized folders
fdawg asset migrate

# Generate Dart asset file
fdawg asset generate-dart

Localization

# Initialize localization
fdawg lang init

# Add a new language
fdawg lang add es

# Add a translation key
fdawg lang insert app.welcome

App Naming

# Get current app names
fdawg namer list

# Set app name for all platforms
fdawg namer set --value "My Awesome App"

# Set platform-specific names
fdawg namer set --android "Android App" --ios "iOS App"

Bundle ID Management

# Get current bundle IDs
fdawg bundler get

# Set universal bundle ID
fdawg bundler set --universal com.company.app

# Set platform-specific bundle IDs
fdawg bundler set --platform android --bundle-id com.company.android

Build Management

# Set up build configuration
fdawg build setup

# Build for specific platforms
fdawg build run --platforms android,ios

# Build with environment
fdawg build run --platforms all --env production

# Show build plan without executing
fdawg build run --platforms android --dry-run

Web Interface

# Start web server on default port (8080)
fdawg serve

# Start on custom port
fdawg serve --port 3000

# Serve specific project
fdawg serve /path/to/flutter/project

Global Options

Most commands support these global options:

  • --help, -h: Show help for the command
  • --version, -v: Show version information (root command only)

Command Structure

Environment Commands (env)

  • list - List all environment files
  • show <env-name> - Show variables in an environment
  • create <env-name> - Create a new environment file
  • add <key> <value> - Add/update a variable
  • remove <key> - Remove a variable
  • delete <env-name> - Delete an environment file
  • generate-dart - Generate Dart environment file

Asset Commands (asset)

  • list - List all project assets
  • add <asset-path> - Add an asset to the project
  • remove <asset-name> - Remove an asset
  • migrate - Organize assets into folders by type
  • generate-dart - Generate Dart asset file

Localization Commands (lang)

  • list - List supported languages
  • init - Initialize localization
  • add <language-code> - Add language support
  • remove <language-code> - Remove language support
  • insert <key> - Add translation key
  • delete <key> - Delete translation key

App Namer Commands (namer)

  • list / get - Get current app names
  • set - Set app names (universal or platform-specific)

Bundle ID Commands (bundler)

  • get - Get current bundle IDs for all platforms
  • set - Set bundle IDs (universal or platform-specific)
  • validate - Validate bundle ID format

Build Commands (build)

  • setup - Interactive build configuration wizard
  • run - Execute builds for specified platforms
  • status - Show build status and available artifacts

Error Handling

FDAWG includes comprehensive error handling:

  • Validation: Commands validate Flutter project structure
  • Backups: Destructive operations create automatic backups
  • Rollback: Failed operations automatically restore from backups
  • Clear messages: Detailed error messages with suggested solutions

Tips and Best Practices

  1. Always run commands from your Flutter project root - FDAWG validates the project structure
  2. Use the web interface for complex operations - Visual feedback and validation
  3. Create backups before major changes - Some commands create automatic backups
  4. Test in development first - Try commands in a test project before production use

Choose a command category below to explore detailed documentation and examples: