๐Ÿš€ Rebrand CLI

Rebrand a Flutter app in seconds. Change the app name, package ID, launcher icon, and native splash screen with one command.

Install

Add the package to your Flutter app as a dev dependency:

flutter pub add dev:rebrand_cli

Then run it from your Flutter app root:

flutter pub run rebrand_cli:rebrand init

This works best when you run the commands inside your app project, because the tool expects a Flutter project with a pubspec.yaml file in the current directory.


โšก 30-second beginner path

  1. Open your Flutter project root.
  2. Generate a starter config:
flutter pub run rebrand_cli:rebrand init
  1. Edit the generated rebrand_config.json with your values.
  2. Run:
flutter pub run rebrand_cli:rebrand

That is the minimal flow for most users.

If you want a more complete starter config, use:

flutter pub run rebrand_cli:rebrand init --full

If rebrand_config.json already exists, the initializer will not overwrite it unless you add --force.


โœจ Minimal example

Copy this into rebrand_config.json:

{
  "app_name": "My New App",
  "package_name": "com.example.mynewapp",
  "icon_path": "assets/logo.png",
  "splash_config": {
    "color": "#FFFFFF",
    "image": "assets/logo.png"
  }
}

Then run:

flutter pub run rebrand_cli:rebrand

This is the best starting point for a first-time user.


๐Ÿง  How it works

Rebrand CLI reads your config and automatically applies the matching actions:

  • app_name โ†’ updates the app label
  • package_name โ†’ renames the Android/iOS package ID
  • icon_path โ†’ generates launcher icons
  • splash_config โ†’ generates native splash screens

No enable_* flags are required when you supply the data directly.


๐Ÿ› ๏ธ Full features (advanced)

Use this section when you want richer splash, branding, and platform-specific options.

{
  "app_name": "My New App",
  "package_name": "com.example.mynewapp",
  "icon_path": "assets/logo.png",
  "enable_android": true,
  "enable_ios": true,
  "clear_splash": false,
  "splash_config": {
    "color": "#FFFFFF",
    "dark_color": "#111111",
    "image": "assets/logo.png",
    "dark_image": "assets/logo_dark.png",
    "gravity": "center",
    "ios_content_mode": "center",
    "fullscreen": false,
    "branding": "assets/branding.png",
    "branding_dark": "assets/branding_dark.png",
    "branding_mode": "bottom",
    "branding_bottom_padding": 24,
    "scaling": 0.7,
    "auto_pad": true,
    "android_12": {
      "color": "#FFFFFF",
      "dark_color": "#111111",
      "image": "assets/logo.png",
      "dark_image": "assets/logo_dark.png",
      "icon_background_color": "#FFFFFF",
      "icon_background_color_dark": "#000000",
      "branding": "assets/branding.png",
      "branding_dark": "assets/branding_dark.png"
    }
  }
}

๐Ÿ”ง Common options

Top-level fields

  • app_name โ†’ app display name
  • package_name โ†’ new Android/iOS identifier, such as com.company.app
  • icon_path โ†’ source image for launcher icon generation
  • splash_config โ†’ splash screen configuration
  • clear_splash โ†’ remove existing splash config and files
  • enable_android โ†’ apply changes to Android
  • enable_ios โ†’ apply changes to iOS

Splash fields

  • color / dark_color โ†’ background colors
  • image / dark_image โ†’ splash images
  • gravity โ†’ Android positioning
  • ios_content_mode โ†’ iOS positioning
  • fullscreen โ†’ hide the Android status bar during splash
  • branding / branding_dark โ†’ optional branding images
  • auto_pad โ†’ automatically pad splash images for Android 12

๐Ÿงน Remove splash screens

To remove an existing splash screen completely:

{
  "clear_splash": true,
  "splash_config": null
}

This removes splash config and restores the default Flutter splash behavior.


๐Ÿงช What the CLI does during a run

When you run rebrand, it can:

  1. Validate the config
  2. Create a backup of key project files
  3. Add helper packages if needed
  4. Rename package IDs
  5. Update app labels
  6. Generate icons and splash assets
  7. Clean up and sync dependencies
  8. Roll back automatically if something fails

๐Ÿ“ฆ Helper packages used internally

Rebrand CLI uses these packages when needed:

  • change_app_package_name
  • flutter_launcher_icons
  • flutter_native_splash

๐Ÿงญ Example project

See example/rebrand_config.json for a working sample configuration.


License

MIT