icon_cleaner 1.0.1
icon_cleaner: ^1.0.1 copied to clipboard
A CLI tool to automatically remove ChatGPT/OpenAI icons and branding from Flutter Dart files.
๐งน icon_cleaner #
A Dart CLI tool to automatically remove ChatGPT/OpenAI icons and branding from your Flutter project files.
When you copy code from ChatGPT responses, it often includes icon references (SVG logos, Image assets, Icon widgets) that you need to manually clean up. This tool does it automatically in one command.
๐ฆ Install #
dart pub global activate icon_cleaner
๐ Usage #
Basic โ clean your lib folder #
icon_cleaner --path lib/
Preview first (dry run โ no changes made) #
icon_cleaner --path lib/ --dry-run
Verbose โ see every removed line #
icon_cleaner --path lib/ --verbose
Full options #
icon_cleaner --help
๐ฏ What It Removes #
| Pattern | Example |
|---|---|
| SVG ChatGPT logos | SvgPicture.asset('assets/chatgpt_logo.svg') |
| Image assets with gpt/openai | Image.asset('assets/openai_icon.png') |
| ChatGPT icon widgets | ChatGptIcon(size: 32) |
| OpenAI avatar widgets | OpenAIAvatar() |
| Import statements | import 'package:chatgpt_ui/icons.dart' |
| Image.network openai URLs | Image.network('https://openai.com/logo.png') |
๐ Example Output #
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐งน ICON CLEANER v1.0.0 โ
โ Remove ChatGPT/OpenAI icons from โ
โ your Flutter project automatically โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Scanning: lib/
๐งน lib/screens/chat_screen.dart โ removed 3 icon line(s)
โ SvgPicture.asset('assets/chatgpt_logo.svg', width: 24)
โ Image.asset('assets/openai_icon.png')
โ ChatGptIcon(size: 32.0)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ RESULTS
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Files scanned : 12
โ๏ธ Files modified : 2
๐๏ธ Lines removed : 5
โ
Done! All ChatGPT/OpenAI icons removed successfully.
๐ง Programmatic Usage #
You can also use this as a library in your own Dart code:
import 'package:icon_cleaner/icon_cleaner.dart';
void main() {
// Clean a single file
final result = cleanFile('lib/screens/chat_screen.dart');
print('Removed ${result.linesRemoved} lines');
// Clean entire directory
final summary = cleanDirectory('lib/', verbose: true);
print('Total removed: ${summary.totalLinesRemoved}');
}
๐ License #
MIT License