Skip to content
pubscout

process_runner

4.2.4, released a year ago by an unverified publisher

Dart process invocation abstraction that manages multi-process queues.

$ flutter pub add process_runner
Source repository

What it does

The package provides a Dart-idiomatic API for spawning external OS processes and managing their standard output and error streams without losing data. It also allows creating a worker pool to run multiple processes concurrently with a set number of active jobs.

AI-written summary of version 4.2.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to run external OS processes in Dart or Flutter with proper stdout and stderr capture.
  • You want to manage a queue or pool of worker processes with limited concurrency.

Skip it when

  • You are building web applications since external OS processes are not supported in the browser environment.

Strengths

  • Properly manages stderr and stdout streams so output is not lost without needing to wait on streams.
  • Supports worker process pools with configurable job concurrency and dependency ordering.
  • Allows supplying a mocked ProcessManager for easier unit testing.

Weaknesses

  • Limited to environments that support spawning external processes (not supported on the web).

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
8

none

import 'package:process_runner/process_runner.dart';

Future<void> main() async {
  ProcessRunner processRunner = ProcessRunner();
  ProcessRunnerResult result = await processRunner.runProcess(['ls']);

  print('stdout: ${result.stdout}');
  print('stderr: ${result.stderr}');
}

Works with

Packages commonly used together with process_runner: ones it builds on, ones built on it, and its own family.