rebrand_cli 2.2.0
rebrand_cli: ^2.2.0 copied to clipboard
Rebrand Flutter apps from one CLI. Rename app/package IDs, update labels, and generate launcher icons plus native splash screens with Android 12 support.
🚀 Rebrand CLI #
Rebrand Flutter apps from one CLI. Update the app name, package name / bundle ID, launcher icons, and native splash screens for Android and iOS with a single command.
Why use it? #
- Rename Android and iOS app identifiers from one config file
- Update the app label shown on the home screen
- Generate launcher icons
- Generate native splash screens with Android 12 support
- Auto-pad splash assets to avoid logo cropping on Android 12+
- Roll back changes automatically if a task fails
- Add only the helper packages actually required by the selected actions
Install #
dart pub global activate rebrand_cli
If rebrand is not found, add Dart pub cache to your PATH.
macOS / Linux #
export PATH="$PATH:$HOME/.pub-cache/bin"
Windows PowerShell #
$env:Path += ";$env:LOCALAPPDATA\Pub\Cache\bin"
Run without changing PATH #
dart pub global run rebrand_cli:rebrand --help
Command reference #
rebrand
rebrand .
rebrand --project ./my_app
rebrand --project ./my_app --config ./my_app/rebrand_config.json
rebrand --help
rebrand --version
Available options #
-h, --helpShow CLI help-v, --versionShow package version-p, --project <path>Target Flutter project root-c, --config <path>Custom config file path
Quick start #
- Go to your Flutter project root
- Create
rebrand_config.json - Run
rebrand
Minimal example #
{
"app_name": "My New App",
"package_name": "com.example.mynewapp",
"icon_path": "assets/logo.png",
"splash_config": {
"color": "#FFFFFF",
"image": "assets/logo.png"
}
}
Full example #
{
"app_name": "My New App",
"package_name": "com.example.mynewapp",
"icon_path": "assets/logo.png",
"enable_splash": true,
"enable_launcher_icon": true,
"enable_package_rename": true,
"enable_app_label": true,
"enable_android": true,
"enable_ios": true,
"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"
}
}
}
Configuration #
Top-level fields #
app_nameApp display namepackage_nameNew Android/iOS identifier likecom.company.appicon_pathSource image for launcher icon generationenable_splashEnable splash generationenable_launcher_iconEnable launcher icon generationenable_package_renameEnable package / bundle ID renameenable_app_labelEnable app label updateenable_androidApply supported changes on Androidenable_iosApply supported changes on iOS
At least one action must be enabled, either explicitly or by providing the related config values.
splash_config fields #
colorLight-mode splash background colordark_colorDark-mode splash background colorimageSplash image path; falls back toicon_pathdark_imageDark-mode splash image pathgravityAndroid gravity likecenter,bottom,fillios_content_modeiOS content mode likecenter,scaleAspectFit,scaleAspectFillfullscreenHide Android status bar during splashbrandingOptional branding imagebranding_darkOptional dark branding imagebranding_modeBranding position, typicallybottombranding_bottom_paddingBottom padding for branding imagescalingAuto-padding scale factor from0 < value <= 1auto_padAuto-pad splash images before generation; defaults totrueandroid_12Android 12 specific overrides
splash_config.android_12 fields #
colordark_colorimagedark_imageicon_background_coloricon_background_color_darkbrandingbranding_dark
How splash works #
Rebrand CLI does not render a splash screen itself at runtime. Instead, it generates a temporary flutter_native_splash configuration and runs the native splash generator for the target Flutter app.
That means the splash is shown by the platform's native launch screen system:
- Android: generated drawables / Android 12 splash resources
- iOS: generated launch storyboard assets
By default, Rebrand CLI auto-pads the splash image so Android 12's circular mask is less likely to crop the important part of your logo. If you want to supply a fully prepared asset yourself, set:
{
"splash_config": {
"auto_pad": false
}
}
What the CLI does during a run #
When you run rebrand, it can:
- Validate the config
- Create a backup of key project files
- Add helper packages if they are missing
- Rename package / bundle IDs
- Update app labels
- Generate icons and splash assets
- Run cleanup and dependency sync steps
- Roll back automatically if something fails
Helper packages used internally #
Rebrand CLI orchestrates these packages when needed:
change_app_package_nameflutter_launcher_iconsflutter_native_splash
Notes and limitations #
- Splash appearance on Android 12 can vary by launcher
- Native splash screens appear before Flutter renders its first frame
- iOS launch screen caching may require uninstall/reinstall when testing repeated changes
- Package renaming is handled as a project-level change and is not split per platform
Example project #
See example/rebrand_config.json for a working sample config.
License #
MIT