Skip to content

Improve flutter pub output #110025

@loic-sharma

Description

@loic-sharma

Use case

The flutter pub output is not ideal:

PS C:\Code> flutter pub
Missing subcommand for "flutter pub".


Run 'flutter -h' (or 'flutter <command> -h') for available flutter commands and options.

Proposal

Running flutter pub without any subcommands should display the same help text as flutter pub -h:

PS C:\Code> flutter pub
Commands for managing Flutter packages.

Global options:
-h, --help                  Print this usage information.
-v, --verbose               Noisy logging, including all shell commands executed.
                            If used with "--help", shows hidden options. If used with "flutter doctor", shows additional diagnostic information. (Use "-vv" to force verbose logging in those cases.)
-d, --device-id             Target device id or name (prefixes allowed).
    --version               Reports the version of this tool.
    --suppress-analytics    Suppress analytics reporting when this command runs.

Usage: flutter pub <subcommand> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  add         Add a dependency to pubspec.yaml.
  ...

Run "flutter help" to see global options.

Metadata

Metadata

Assignees

Labels

a: qualityA truly polished experiencec: proposalA detailed proposal for a change to FluttertoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions