AlwaysRightInstitute / Shell

Licence: MIT license
Module exposing Unix command line tools as Swift 5 @dynamicCallable functions

Programming Languages

swift
15916 projects
shell
77523 projects

Labels

Projects that are alternatives of or similar to Shell

StoreHelper
Implementing and testing In-App Purchases with StoreKit2 and StoreHelper in Xcode 13, Swift 5.5, SwiftUI, iOS 15 and macOS 12.
Stars: ✭ 158 (+51.92%)
Mutual labels:  swift5
SwiftRadix
Easily convert integers to binary/hex/octal strings and back again with clean functional syntax.
Stars: ✭ 34 (-67.31%)
Mutual labels:  swift5
Combinative
UI event handling using Apple's combine framework.
Stars: ✭ 106 (+1.92%)
Mutual labels:  swift5
RichEditorView
Rich Text Editor in Swift. Newly Featured Code and Swift 5 compatible of cjwirth/RichEditorView.
Stars: ✭ 105 (+0.96%)
Mutual labels:  swift5
MMActionSheet
An actionSheet view implement with pure swift
Stars: ✭ 25 (-75.96%)
Mutual labels:  swift5
SwiftUI-App
This swiftUI Demo is very simple & easy to understand. This swiftUI demo includes On-boarding screens, login screen, forgot password screen, sign up screen, home & logout.
Stars: ✭ 175 (+68.27%)
Mutual labels:  swift5
VideoTimelineView
Video timeline UI for iOS Apps
Stars: ✭ 103 (-0.96%)
Mutual labels:  swift5
m3u8ToMP4
iOS demo,avplayer play m3u8 .ts file
Stars: ✭ 22 (-78.85%)
Mutual labels:  swift5
SwiftTTPageController
最常见的标签控制器,仿今日头条首页、网易新闻首页 ,实现多个ViewController列表切换(更新适配Swift5)
Stars: ✭ 26 (-75%)
Mutual labels:  swift5
TinyRage
Flappy Bird for WatchOS 6+ written in swift 5 using spriteKit
Stars: ✭ 23 (-77.88%)
Mutual labels:  swift5
FireSnapshot
A useful Firebase-Cloud-Firestore Wrapper with Codable.
Stars: ✭ 56 (-46.15%)
Mutual labels:  swift5
iOS-SwiftUI-Firebase-Login-Example
Complete Sign up and Sign in Process for iOS SwiftUI - using Firebase Email and Password Authentication.
Stars: ✭ 37 (-64.42%)
Mutual labels:  swift5
DPVideoMerger-Swift
Multiple videos merge in one video with manage scale & aspect ratio and also merge videos to grid matrix layout for Swift.
Stars: ✭ 49 (-52.88%)
Mutual labels:  swift5
XYColor
An easy way to adapter dark mode on CALayer. iOS 快速适配夜间模式
Stars: ✭ 76 (-26.92%)
Mutual labels:  swift5
SwiftQRCodeScanner
An easy QR code reader for iOS written in Swift
Stars: ✭ 49 (-52.88%)
Mutual labels:  swift5
awesome-ios
A collaborative list of awesome for iOS developers. Include quick preview.
Stars: ✭ 1,329 (+1177.88%)
Mutual labels:  swift5
core-data-model-description
Declarative way to describe a Core Data model in code.
Stars: ✭ 60 (-42.31%)
Mutual labels:  swift5
SwiftyPing
ICMP ping client for Swift 5
Stars: ✭ 129 (+24.04%)
Mutual labels:  swift5
JSONPreview
🎨 A view that previews JSON in highlighted form, it also provides the ability to format and collapse nodes.
Stars: ✭ 21 (-79.81%)
Mutual labels:  swift5
EnumKit
EnumKit is a library that gives you the ability to simply access an enum associated value, without having to use pattern matching. It also offers many utilities available to other swift types, like updatability of an associated value and transformations.
Stars: ✭ 91 (-12.5%)
Mutual labels:  swift5

Shell

Swift5 macOS

Module exposing Unix command line tools as Swift 5 @dynamicCallable functions

A few words of warning: This is intended as a demo. It should work just fine, but in the name of error handling and proper Swift beauty, you might want to approach forking processes differently 🤓 (BTW: PRs are welcome!)

Part of this blog post: @dynamicCallable: Unix Tools as Swift Functions.

Sample tool

The regular Swift Package Manager setup process:

mkdir ShellConsumerTest && cd ShellConsumerTest
swift package init --type executable

Sample main.swift:

import Shell

print(shell.host("zeezide.de"))

Sample Package.swift:

// swift-tools-version:5.0

import PackageDescription

let package = Package(
    name: "ShellConsumerTest",
    dependencies: [
        .package(url: "https://github.com/AlwaysRightInstitute/Shell.git",
                 from: "0.1.0"),
    ],
    targets: [
        .target(name: "ShellConsumerTest", dependencies: [ "Shell" ]),
    ]
)

Remember to add the dependency in two places. WET is best!

swift run and swift test patch the $PATH to just /usr/bin. You may want to run the binary directly to make lookup work properly.

For this to work, you need to have Swift 5+ installed.

Links

Who

Brought to you by ZeeZide. We like feedback, GitHub stars, cool contract work, presumably any form of praise you can think of.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].