Swiftpack.co - GeorgeLyon/Shwift as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by GeorgeLyon.
GeorgeLyon/Shwift 1.2.1
Shell scripting in Swift
⭐️ 26
🕓 23 weeks ago
macOS linux
.package(url: "https://github.com/GeorgeLyon/Shwift.git", from: "1.2.1")

Shwift

Overview

Shwift is a package which provides tools for shell scripting in Swift.

For example, you can write:

try await echo("Foo", "Bar") | sed("s/Bar/Baz/")

More capability is demonstrated in the ScriptExample target.

The Shwift library provides some basic building blocks for launching executables and processing their output using builtins. It is built to be non-blocking (thanks to swift-nio), which works really well with the new Swift concurrency features.

The Script library brings these capabilities together with swift-argument-parser for providing a familiar and user-friendly API for writing shell scripts in Swift. For instance, while Shwift provides the basic capability of piping the output of one command to another, Script provides the | operator to do this the way you would in a shell script.

GitHub

link
Stars: 26
Last commit: 6 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Dependencies

Release Notes

1.2.1
23 weeks ago

What's Changed

Full Changelog: https://github.com/GeorgeLyon/Shwift/compare/1.2.0...1.2.1

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics