command_wrapper 0.2.0

  • Installing
  • Versions
  • 36


command_wrapper package makes it easy to create a Dart wrapper for command line tools.


CommandWrapper lets you create a Dart wrapper for command line tools. For example, you can create a wrapper for curl by passing the executable name to the CommandWrapper constructor. The path of curl is autmatically located in a platform independent manner using which package.

CommandWrapper curl = new CommandWrapper('curl');
CommandResult result = await['--version']);

CommandResult contains stdout, stderr and exitCode. The type of stdout and stderr is List<String> so you can easily process each line.


command_wrapper provides wrappers for commonly used Dart commands.

  • dart
  • pub
  • dart2js
  • dartfmt
  • dartanalyzer
  • dartdoc


import 'package:command_wrapper/command_wrapper.dart';

main() async {
  // Use dart CommandWrapper instance.
  CommandResult result = await['--version']);

  // Create a new CommandWrapper.
  CommandWrapper curl = new CommandWrapper('curl');
  result = await['--version']);



  • Add stdin argument to run method


  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  command_wrapper: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:command_wrapper/command_wrapper.dart';
Version Uploaded Documentation Archive
0.2.0 Oct 21, 2016 Go to the documentation of command_wrapper 0.2.0 Download command_wrapper 0.2.0 archive
0.1.0 Oct 20, 2016 Go to the documentation of command_wrapper 0.1.0 Download command_wrapper 0.1.0 archive


We analyzed this package on Jun 12, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.60.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
97 / 100
Reflects how tidy and up-to-date the package is. [more]
36 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, other

Primary library: package:command_wrapper/command_wrapper.dart with components: io.


  • Fix .analysis_options.

    We were unable to parse .analysis_options.

  • Package is getting outdated.

    The package was released 85 weeks ago.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 2 hints.

    Strong-mode analysis of lib/src/command_wrapper_base.dart gave the following hint:

    line: 62 col: 20
    'UTF8' is deprecated and shouldn't be used.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

  • Enable strong mode analysis.

    Strong mode helps you to detect bugs and potential issues earlier.Start your analysis_options.yaml file with the following:

      strong-mode: true


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <2.0.0
which >=0.1.3 <0.2.0 0.1.3
Transitive dependencies
path 1.6.0
when 0.2.0
Dev dependencies
test >=0.12.0 <0.13.0