Cleanbev for VS Code
Find and remove unused assets in your Dart/Flutter project without leaving the editor. This extension brings cleanbev — a CLI tool that detects unused assets and helps keep your project clean — straight into VS Code.
Features
- 🔍 Automatic Asset Detection — scans your project to find all asset files and their usage
- ⚠️ Unused Asset Identification — flags assets that are declared but never referenced in code
- ✅ Safe by Default — run a dry-run scan first to see exactly what would be removed, before deleting anything
- 🚀 One Command Away — trigger a scan or clean-up straight from the Command Palette, no terminal required
- 📊 Structured Results — dry-run results are parsed from cleanbev's JSON output and shown directly in VS Code
Requirements
This extension is a companion UI for the cleanbev CLI — it does not bundle it. You need:
Installation
- Install this extension from the VS Code Marketplace.
- Make sure
cleanbev is activated globally (see Requirements).
- Open a Dart/Flutter project (a folder containing
pubspec.yaml).
Usage
Open the Command Palette (Cmd/Ctrl+Shift+P) and run:
| Command |
Description |
| Cleanbev: Dry Run |
Scans your project and reports unused assets as structured results, without deleting anything |
| Cleanbev: Clean |
Scans your project and removes unused assets, prompting for an assets path first |
By default, cleanbev scans the assets/ directory declared in your pubspec.yaml. You'll be prompted to confirm or change the assets path when running a command.
Ignoring assets
Cleanbev scans all folders and subfolders under your assets path by default. To exclude specific assets or paths, add a .cleanbevignore file to your project root, same as you would with the CLI directly.
How It Works
- Scanning — cleanbev reads your
pubspec.yaml to find all declared assets
- Analysis — it searches your Dart/Flutter code for references to each asset
- Reporting — the extension surfaces the list of unused assets found
- Cleanup — running the Clean command removes the assets cleanbev identifies as unused
Known Limitations
- Requires the Dart SDK and
cleanbev CLI to be installed and on PATH (see Requirements). Support for a bundled, dependency-free binary is planned for a future release.
- Only the first workspace folder is scanned in multi-root workspaces.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request on GitHub.
For issues with the underlying CLI or MCP server rather than this extension, see the cleanbev package repo instead.
License
This project is licensed under the MIT License - see the LICENSE file for details.