⌘ Running Command from Swift
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.0")
],
...
)
Then import the PLCommand from thr location you want to use.
import Command
The documentation for releases and main
are available here:
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")
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()
PLCommand is easier to scale.
extension CommandValues {
var swift: Alias {
Alias(executableURL: "/usr/bin/swift")
}
}
// Usage
@Command(\.swift) var swiftCommand
plcommand is under MIT license. See the LICENSE file for more info.
link |
Stars: 2 |
Last commit: 1 week ago |
Change the style of the previously supported command (Git, Swift Package) and support it again.
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()
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics