process_run
1.4.4+1, released 4 days ago by tekartik.com
Run shell scripts and locate executables across Linux, Windows and macOS.
What it does
The package provides a Shell class that can execute scripts in a portable way and a whichSync function that searches for installed executables. It also offers process inspection utilities such as finding running processes by executable name and killing process trees.
AI-written summary of version 1.4.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to run shell commands from a Dart/Flutter app
- You need to locate an executable on the host system
- You need to inspect or terminate running processes
Skip it when
- You only need simple command execution without process inspection
- You are targeting only a single platform and prefer a native solution
Strengths
- Cross‑platform command execution
- Built‑in which‑like search for executables
- Process inspection and killing utilities
- No external dependencies beyond Dart SDK
Weaknesses
- No async stream API for process output
- Limited to Dart VM (not web)
- Requires platform permissions for process control
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 8
import 'package:process_run/shell.dart';
var shell = Shell();
await shell.run('''
# Display some text
echo Hello
''');Alternatives
Packages that do the same job and could replace process_run.
- supercharged_dart
Kotlin-inspired convenience methods and helper extensions for Dart.
50Compare - supercharged
Extension methods adding utility functions for Dart and Flutter.
50Compare
Works with
Packages commonly used together with process_run: ones it builds on, ones built on it, and its own family.
- yamlprocess_run depends on itA Dart library for parsing YAML documents into Dart data structures.
- pub_semverprocess_run depends on itVersions and version constraints implementing pub's versioning policy.
- argsprocess_run depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- string_scannerprocess_run depends on itA class for parsing strings using a sequence of patterns.
- synchronizedprocess_run depends on itLock mechanism to prevent concurrent access to asynchronous code.
- sqflite_commonSame familyDart wrapper on SQLite providing the common API for sqflite and desktop FFI implementations.
- sqflite_common_ffiSame familyFFI-based implementation of sqflite for desktop platforms and unit tests.
- sembastSame familyA NoSQL persistent embedded document-based database for Dart and Flutter.