Flutter OSS Manager
A CLI tool that scans open-source licenses in Flutter projects and generates Dart files
Overview
A CLI tool that automatically scans all open-source package licenses in a Flutter project and generates a Dart file containing the results. It eliminates the tedious manual process of collecting license information when building an open-source attribution screen in your app.
Key Features
- Automatically collects licenses for all dependencies by analyzing
pubspec.lock - Generates a Dart file containing package name, version, full license text, license type, and repository URL
- Two-tier license identification system: heuristic matching followed by Jaccard similarity-based fallback
- Automatic detection of major licenses including MIT, Apache-2.0, BSD, GPL, LGPL, and MPL
- Warnings for GPL/LGPL/AGPL license detection
- Automatic inclusion of Flutter SDK package licenses (flutter, flutter_test, sky_engine)
- Separate
generatecommand for converting a single license file
Supported Platforms
Android, iOS, Web, Linux, Windows
Technical Highlights
The tool employs a two-tier strategy for license identification. It first attempts fast, high-confidence detection using regex patterns and keyword-based heuristic matching. When that fails, it falls back to Jaccard similarity comparison against license templates. Each license type has its own dedicated template class (MitLicenseInfo, ApacheLicenseInfo, etc.), keeping the identification logic modular and extensible.
The CLI uses a command-based architecture (scan, generate) built on the args package, with configurable options like output path.
Why It Stands Out
Open-source attribution is a legal requirement when distributing Flutter apps, but manually managing licenses across dozens of packages is impractical. This tool generates all license information as Dart code with a single dart run command, making it straightforward to integrate into an in-app attribution screen. The GPL-family license warning feature is particularly valuable for commercial projects where copyleft obligations need to be flagged early.