process_run 0.11.0+2

Dart native
Flutter Android iOS

Process run helpers for Linux/Win/Mac and which like feature for finding executables.

process_run #

Process run helpers for Linux/Win/Mac.

Build Status

Goals #

Currently using does not stream output which is not convenient for lengthy operation. It requires using Process.start in a more complex way.

run and runCmd add verbose helper for that. Also dart binaries (pub, dart2js...) and any script can be called consistently on Mac/Windows/Linux

ProcessCmd allow creating command object that can be run and modified.

Usage #

run #

Additional options to are

  • specifying stdin
  • making it verbose

Additional feature

  • It tries to resolve simple command like dart, firebase, flutter, or any script available on the user path on any Platform.
import 'package:process_run/process_run.dart';

Display dart version and the command executed:

await run('dart', ['--version'], verbose: true);

which #

Like unix which, it searches for installed executables

import 'package:process_run/which.dart';

Find flutter and firebase executables:

var flutterExectutable = whichSync('flutter');
var firebaseExectutable = whichSync('firebase');

shell #

Allows to run script from Mac/Windows/Linux in a portable way. Empty lines are added for lisibility

import 'package:process_run/shell.dart';

Run a simple script:

var shell = Shell();


# Display some text
echo Hello

# Display dart version
dart --version

# Display pub version
pub --version


More information on shell here

Flutter context #


If you want to run executable in a MacOS flutter context, you need to disable sandbox mode. See Removing sandboxing and ProcessException: Operation not permitted on macOS

Additional features #

Addtional features and information are available here

pub points


Process run helpers for Linux/Win/Mac and which like feature for finding executables.

Repository (GitHub)
View/report issues


API reference




args, collection, io, meta, path, pub_semver, yaml


Packages that depend on process_run