๐ 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.yamlfile in the current directory.
โก 30-second beginner path
- Open your Flutter project root.
- Generate a starter config:
flutter pub run rebrand_cli:rebrand init
- Edit the generated
rebrand_config.jsonwith your values. - 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.jsonalready 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 labelpackage_nameโ renames the Android/iOS package IDicon_pathโ generates launcher iconssplash_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 namepackage_nameโ new Android/iOS identifier, such ascom.company.appicon_pathโ source image for launcher icon generationsplash_configโ splash screen configurationclear_splashโ remove existing splash config and filesenable_androidโ apply changes to Androidenable_iosโ apply changes to iOS
Splash fields
color/dark_colorโ background colorsimage/dark_imageโ splash imagesgravityโ Android positioningios_content_modeโ iOS positioningfullscreenโ hide the Android status bar during splashbranding/branding_darkโ optional branding imagesauto_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:
- Validate the config
- Create a backup of key project files
- Add helper packages if needed
- Rename package IDs
- Update app labels
- Generate icons and splash assets
- Clean up and sync dependencies
- Roll back automatically if something fails
๐ฆ Helper packages used internally
Rebrand CLI uses these packages when needed:
change_app_package_nameflutter_launcher_iconsflutter_native_splash
๐งญ Example project
See example/rebrand_config.json for a working sample configuration.
License
MIT