Skip to content
pubscout

script_runner

0.7.6, released 2 years ago by casraf.dev

Runs configurable project scripts from a YAML/JSON file via a CLI tool.

$ flutter pub add script_runner
Source repository

What it does

Provides a portable way to define and execute project‑related commands, similar to npm scripts. Scripts can be chained, have environment variables, custom shells, and can be invoked globally with the `scr` executable.

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

Use it when

  • You need a simple, language‑agnostic way to manage build, lint, or deployment commands for a Dart/Flutter project
  • You want a self‑documenting script list that can be version‑controlled alongside code

Skip it when

  • You require complex task orchestration with dependencies beyond simple command chaining
  • You need a GUI or visual workflow editor

Strengths

  • No code generation required
  • Works on all major platforms
  • Configurable per‑project with YAML/JSON
  • Can be installed globally for easy CLI access

Weaknesses

  • Limited to command‑line scripts; not a full task runner like Make or Gradle
  • No built‑in support for parallel execution

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:script_runner/script_runner.dart';

void main() {
  final runner = ScriptRunnerConfig(
    scripts: [
      RunnableScript(name: 'hello', cmd: 'echo', args: ['Hello world']),
    ],
  );
  runner.scriptsMap['hello']!.run();
}

Alternatives

Packages that do the same job and could replace script_runner.

  • dart_spawner

    Runs Dart scripts, files, or URIs inside a new Isolate of the current Dart VM.

  • apollovm

    Portable multi-language VM to parse, run, translate, and compile Dart, Java, Kotlin, Go, C#, JS, and Python.

  • puby

    Run Dart and Flutter commands across multiple projects in the current directory.

Works with

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