rebrand_cli 3.1.2
rebrand_cli: ^3.1.2 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_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"
}
}
}
Configuration #
Simple Model: Data Presence = Auto-Enable #
If you provide data, it's automatically applied:
- β
Provide
app_nameβ App label updated - β
Provide
package_nameβ Package renamed - β
Provide
icon_pathβ Launcher icons generated - β
Provide
splash_configβ Splash screen generated
No need for enable_* flagsβthey're automatic!
Top-level fields #
app_nameApp display name (if provided β updated)package_nameNew Android/iOS identifier likecom.company.app(if provided β renamed)icon_pathSource image for launcher icon generation (if provided β generated)splash_configSplash screen configuration (if provided β generated)clear_splashRemove existing splash screen (default: false). Set to true to delete splash and regenerateenable_androidApply changes on Android (default: true)enable_iosApply changes on iOS (default: true)
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
}
}
Removing Splash Screens #
To completely remove an existing splash screen:
{
"clear_splash": true,
"splash_config": null
}
This will:
- Remove
flutter_native_splashfrompubspec.yaml - Delete all splash-related configuration and files
- Restore app to using default Flutter splash
To remove splash AND add a new one:
{
"clear_splash": true,
"splash_config": {
"color": "#NEW_COLOR",
"image": "assets/new_splash.png"
}
}
This removes old splash, then generates fresh one with new config.
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