cli_script
Write scripts that call subprocesses with the ease of shell scripting and the power of Dart.
1.0.0
12K downloads/mo
#2669 most downloaded on pub.dev
google/dart_cli_script
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 8 months
Nearly every release is documented
notes for 13 of 13 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
13 releases · first in 2021
0 releases in the last 12 months
see the full history below
Release timeline
13 releases · May 2021 to Jul 2023Releases
latest 13-
1.0.006 Jul 2023Release notes
Open source →This was always intended for public use, it was just left out
accidentally.This also makes a stable 1.0.0 release.
Release notes
Open source →-
Stable release.
-
Expose the
args()function, which shell-escapes multiple arguments at once. -
Update internal type annotations for compatibility with dart-lang/sdk#52801.
-
-
0.3.123 Feb 2023Release notes
Open source →- Add
Script.outputBytes, which works likeScript.outputbut returns the raw bytes instead of a string representation.
- Add
-
0.3.019 Dec 2022Release notes
Open source →- stream scripts can be interrupted, capturing scripts can't but their signal can be reacted to
- xargs won't execute a callback on the last chunk
- streams signal handlers no longer need to explicitly check for exit code
Release notes
Open source →- Add
Script.kill()to send aProcessSignalsuch asSIGKILLorSIGTERMto terminate a script or stream. Defaults toSIGTERM. Capturing functions likeScript.captureorsilenceUntilFailurecan't terminate their callbacks but theProcessSignalcan be reacted to via their newonSignalhandler.
-
0.2.619 Apr 2022Release notes
Open source →This parameter allows callers to silence or buffer only a script's
standard error and still handle its standard output.Release notes
Open source →- Add a
stderrOnlyparameter toBufferedScript.capture()andsilenceUntilFailure(). If this parameter istrue, only thestderrfrom the callbacks will be buffered or silenced, and thestdoutwill be emitted normally.
- Add a
-
0.2.512 Apr 2022Release notes
Open source →-
Add
LineStreamExtensions.withSpans(), which addsSourceSpanWithContexts to a stream's lines for better error messaging and debugging. -
Add
readWithSpans(), which addsSourceSpanWithContexts to a file's lines for better error messaging and debugging. -
Add
LineAndSpanStreamExtensions, which provides various extension methods that preserve source spans.
-
-
0.2.417 Feb 2022Release notes
Open source →- Add a
silenceUntilFailure()function that suppresses output for a block of code until it emits an error.
- Add a
-
0.2.317 Aug 2021Release notes
Open source →-
Add an
onlyMatchingflag togrep()which prints the sections of input lines that match the given regular expression. -
Add a
teeToStderrtransformer and extension method onStream<List<String>>. This passes a stream to stderr without modifying it, which is useful for debugging. -
Add a
Script.mapLinesconstructor that returns a script that maps stdin lines according to aString Function(String). -
Add support for passing a
String Function(String)toScript.pipelineandScript.operator |to map stdin lines. -
Fold stack frames for a few more packages used internally.
-
-
0.2.3+127 Aug 2021 -
0.2.3+225 Jan 2022 -
0.2.226 Jul 2021Release notes
Open source →This buffers output from a Script until it's explicitly released,
making it easier to run multiple script in parallel without having
their outputs collide with one another.Release notes
Open source →-
Add a
BufferedScriptclass that buffers output from a Script until it's explicitly released, making it easier to run multiple script in parallel without having their outputs collide with one another. -
If the same
capture()block both callsprint()and writes tocurrentStdout, ensure that the order of prints is preserved. -
If the same
capture()block writes to bothcurrentStdoutandcurrentStderr, ensure that the relative order of those writes is preserved when collected withcombineOutput().
-
-
0.2.114 Jun 2021Release notes
Open source →- Give the stream transformers exposed by this package human-readable
toString()s.
- Give the stream transformers exposed by this package human-readable
-
0.2.009 Jun 2021Release notes
Open source →-
Add a
debugoption towrapMain()to print extra diagnostic information. -
Add a
runInShellargument for subprocesses. -
Accept
Iterable<String>instead ofList<String>for subprocess arguments. -
Use 257 rather than 256 as the sentinel value for
ScriptExceptions caused by Dart exceptions. -
Fix a bug where Dart exceptions could cause the script to exit before their debug information was printed to stderr.
-
-
0.1.025 May 2021