A command-line wrapper using utilities from dart_dependency_checker for checking and fixing dependencies within Dart/Flutter packages.
Command | Alias | Description |
---|---|---|
deps-used |
du |
Lists dependencies that are actively used in the project's codebase. |
deps-unused |
dun |
Lists dependencies that are declared in the pubspec.yaml file but are not utilized in the project's codebase. Supports an instant fix during run. |
transitive-use |
tu |
Lists dependencies that are used directly in the project without being explicitly declared in the pubspec.yaml file. |
deps-add |
da |
Blindly adds specified dependencies to the pubspec.yaml file. Supports adding both main and dev dependencies, including those from path or git sources. |
deps-update |
dup |
Updates provided but only existing main and dev dependencies in a pubspec.yaml file. Supports updating both main and dev dependencies, including those from path or git sources. |
deps-sort |
ds |
Sorts the dependencies listed in the pubspec.yaml file, organizing them in a standardized order for better readability and maintenance. |
dart pub global activate dart_dependency_checker_cli
Lists dependencies that are actively used in the project's codebase.
-p, --path=<path> Path to valid pubspec.yaml.
--main-ignores Comma separated list of main dependencies to be ignored.
--dev-ignores Comma separated list of dev dependencies to be ignored.
--[no-]json Output in json format.
ddc deps-used --main-ignores http,path_provider --json
Lists dependencies that are declared in the pubspec.yaml
file but are not utilized in the project's codebase. Supports
an instant fix during run.
-p, --path=<path> Path to valid pubspec.yaml.
--main-ignores Comma separated list of main dependencies to be ignored.
--dev-ignores Comma separated list of dev dependencies to be ignored.
--[no-]fix Instant cleanup after checker run.
--[no-]json Output in json format.
ddc deps-unused --dev-ignores lints,build_runner --fix
Lists dependencies that are used directly in the project without being explicitly declared in the pubspec.yaml
file.
-p, --path=<path> Path to valid pubspec.yaml.
--main-ignores Comma separated list of main dependencies to be ignored.
--dev-ignores Comma separated list of dev dependencies to be ignored.
--[no-]json Output in json format.
ddc transitive-use --main-ignores async,meta
Blindly adds specified dependencies to the pubspec.yaml
file. Supports adding both main and dev dependencies,
including those from path or git sources.
-p, --path=<path> Path to valid pubspec.yaml.
--main Comma separated list of main dependencies.
--dev Comma separated list of dev dependencies.
--[no-]json Output in json format.
ddc deps-add --main equatable:2.0.7,meta:^1.3.0 --dev some_path_source:path=../some_path_dependency
Updates provided but only existing main and dev dependencies in a pubspec.yaml
file. Supports updating both main and
dev dependencies, including those from path or git sources.
-p, --path=<path> Path to valid pubspec.yaml.
--main Comma separated list of main dependencies.
--dev Comma separated list of dev dependencies.
--[no-]json Output in json format.
ddc deps-update --main equatable:2.0.7,meta:^1.3.0 --dev some_path_source:path=../some_path_dependency
Sorts the dependencies listed in the pubspec.yaml
file, organizing them in a standardized order for better readability
and maintenance.
-p, --path=<path> Path to valid pubspec.yaml.
--[no-]json Output in json format.
ddc deps-sort
See the LICENSE file.
See the CHANGELOG.md file.