Swiftpack.co - pelagornis/plcommand as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by pelagornis.
pelagornis/plcommand 1.2.5
Running Command with Swift
⭐️ 2
🕓 11 weeks ago
macOS
.package(url: "https://github.com/pelagornis/plcommand.git", from: "1.2.5")

PLCommand

Official SPM Swift License Platform

⌘ Running Command from Swift

Installation

PLCommand was deployed as Swift Package Manager. Package to install in a project. Add as a dependent item within the swift manifest.

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/pelagornis/plcommand.git", from: "1.2.5")
    ],
    ...
)

Then import the PLCommand from thr location you want to use.

import Command

Documentation

The documentation for releases and main are available here:

Using

If you want to use Bash.

@Command(\.bash) var bashCommand
bashCommand.run("command")

Or if you want to use zsh.

@Command(\.zsh) var zshCommand
zshCommand.run("command")

Or if you want to use Makefile command.

@Command(\.make) var makeCommand
makeCommand.run("command")

Frequently Used Commands

PLCommand supports frequently used features.

Support Git Command

@Command(\.git) var git

git.`init`()
git.add()
git.clone(repositoryURL)
git.commit("comment")
git.push()
git.pull(remote: "origin")
git.checkout(branch: "gh-page")

Support Swift Package Command

@Command(\.package) var swiftPackage

swiftPackage.create()
swiftPackage.create(type: .executable)
swiftPackage.update()
swiftPackage.generateXcodeproj()
swiftPackage.build()
swiftPackage.test()

Support Fastlane Command

@Command(\.fastlane) var fastlane

fastlane.`init`()
fastlane.tests()
fastlane.snapshot()
fastlane.deliver()
fastlane.frameit()
fastlane.run("fastlane command")

Support Tuist Command

@Command(\.tuist) var tuist

tuist.build()
tuist.clean()
tuist.fetch()
tuist.edit()
tuist.graph()
tuist.generate()
tuist.migration([])
tuist.scaffold("template", [])
tuist.test()
tuist.run("tuist command")

Extension

PLCommand is easier to scale.

extension CommandValues {
    var swift: Alias {
        Alias(executableURL: "/usr/bin/swift")
    }
}


// Usage
@Command(\.swift) var swiftCommand

License

plcommand is under MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 2
Last commit: 4 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

PLCommand v1.2.5
11 weeks ago

What's Changed

  • Update Tuist Support & Test Part

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