Skip to content

marcelo-es/swell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swell 🌊

A nimble Swift Shell library.

Usage

Just add Swell to your package dependencies:

dependencies: [
    // ...
    .package(url: "https://github.com/marcelo-es/swell", from: "0.0.1"),
]

And add Swell to your target's dependencies:

targets: [
    .target(name: "MyTarget", dependencies: [
        // ...
        .product(name: "Swell", package: "swell"),
    ])
]

Then execute shell commands and receive the standard output and error:

let (output, error) = try await Swell.run("echo", "Hello world")

Or, if you are only interested in the standard output:

let output = try = try await Swell.run("echo", "Hello world").output

Swell looks for the executable in your $PATH for you.

About

Swell is a Swift shell interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages