• This repository has been archived on 27/Sep/2019
  • Stars
    star
    235
  • Rank 171,050 (Top 4 %)
  • Language
  • License
    MIT License
  • Created over 7 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A list of Swift scripting tools, frameworks & examples

โš ๏ธ NO LONGER MAINTAINED This list is no longer kept up to date, so some of its information may no longer be relevant.

Swift scripting resources

This is a list of tools, frameworks & examples that you might find useful when scripting in Swift ๐Ÿš€

Index

Tools

Marathon

Marathon makes it easy to write, run and manage your Swift scripts. Quickly create, edit, run, install & share your scripts, and easily add dependencies to them.

PackageBuilder

PackageBuilder builds a simple command-line structure using SPM. The structure follows the approach described in Building a command line tool using the Swift Package Manager separating your code between a framework and the executable.

Swift Package Manager

The Package Manager for the Swift Programming Language. Using it you can manage your dependencies + compile & run your scripts. Also enables you to generate Xcode projects for your scripts.

Frameworks

While most Swift frameworks can be used in scripts, the ones in this list are particularily useful in tasks that are common when doing Swift scripting.

Commandant

Commandant is a Swift framework for parsing command-line arguments, inspired by Argo (which is, in turn, inspired by the Haskell library Aeson).

Commander

Commander is a small Swift framework allowing you to craft beautiful command line interfaces in a composable way. Accept input in a type safe way with great error handling and provide descriptions for your arguments.

CommandLineKit

A pure Swift library for creating command-line interfaces. Using it, you can easily accept parameters & flags in your scripts, and print help messages & usage instructions for them.

Files

A nicer way to handle files & folders in Swift. Files gives you an object-oriented API around the file system, making it easy to create, move, rename and handle files & folders in a script.

Guaka

Guaka helps you create modern and familiar CLI apps in the vein of widely used projects such as: Docker, Kubernetes, OpenShift, Hugo and more.

Guitar

A Cross-Platform String and Regular Expression Library Written in Swift. Makes it easier to handle strings (such as input) in your scripts, evaluate regular expressions on them, transform them, and more.

Rainbow

Delightful console output for Swift developers. Rainbow makes it easy to color the text your script outputs on the command line.

Releases

A Swift package for resolving released versions from a Git repository. Enables you to easily build tooling around Git versions. Resolve, sort & filter versions for both remote & local repositories.

ShellOut

Easily run shell commands from a Swift script or command line tool. Gives you a simple function that enables you to "shell out" and run tasks on the command line from your scripts.

Swiftline

Swiftline is a set of tools to help you create command line applications.

SwiftShell

A library for creating command-line applications and running shell commands in Swift. It provides features such as running asynchronous tasks, handling contexts & errors and managing input & output.

Xgen

A Swift package for generating Xcode workspaces & playgrounds. Using it, you can build developer tools & scripts that generates workspaces for your projects, or playgrounds for quick prototyping.

Examples

Carting

Carting is a simple tool for updating Carthage Build Phase.

Marathon Examples

A collection of example Swift scripts that can easily be run using Marathon.

Playground

Instantly create Swift playgrounds from the command line.

Selenops

A stupid simple Swift Web Crawler.

TestDrive

Quickly try out any Swift pod or framework in a playground.

Contributing

This list is still in its early days, so a lot of awesome stuff is sure to be missing. If you know of a tool, framework or example that should be on this list - add it and open a PR! ๐Ÿ‘ Before you do though, here are some quick guidelines:

  • You can totally add your own creations.
  • Only add things that are open source, and that are generally useful for Swift scripting.
  • Don't add general Swift frameworks such as JSON mappers or networking libraries (there are other lists for that).
  • Keep the list in alphabetical order.
  • Follow the same style as for the other entries.
  • No more than 2 lines of description for each entry.

Looking forward to your contributions and seeing this list grow! ๐ŸŽ‰

More Repositories

1

Publish

A static site generator for Swift developers
Swift
4,840
star
2

SwiftTips

A collection of Swift tips & tricks that I've shared on Twitter
3,971
star
3

Files

A nicer way to handle files & folders in Swift
Swift
2,456
star
4

Ink

A fast and flexible Markdown parser written in Swift.
Swift
2,377
star
5

Plot

A DSL for writing type-safe HTML, XML and RSS in Swift.
Swift
1,979
star
6

Unbox

[Deprecated] The easy to use Swift JSON decoder
Swift
1,956
star
7

Marathon

[DEPRECATED] Marathon makes it easy to write, run and manage your Swift scripts ๐Ÿƒ
Swift
1,863
star
8

ImagineEngine

A project to create a blazingly fast Swift game engine that is a joy to use ๐Ÿš€
Swift
1,825
star
9

SwiftPlate

Easily generate cross platform Swift framework projects from the command line
Swift
1,766
star
10

Splash

A fast, lightweight and flexible Swift syntax highlighter for blogs, tools and fun!
Swift
1,758
star
11

TestDrive

Quickly try out any Swift pod or framework in a playground
Swift
1,597
star
12

Codextended

Extensions giving Swift's Codable API type inference super powers ๐Ÿฆธโ€โ™‚๏ธ๐Ÿฆนโ€โ™€๏ธ
Swift
1,495
star
13

ShellOut

Easily run shell commands from a Swift script or command line tool
Swift
836
star
14

Wrap

[DEPRECATED] The easy to use Swift JSON encoder
Swift
732
star
15

CollectionConcurrencyKit

Async and concurrent versions of Swiftโ€™s forEach, map, flatMap, and compactMap APIs.
Swift
730
star
16

Sweep

Fast and powerful Swift string scanning made simple
Swift
531
star
17

Playground

Instantly create Swift playgrounds from the command line
Swift
439
star
18

Require

Require optional values to be non-nil, or crash gracefully
Swift
414
star
19

XcodeTheme

My Xcode theme - Sundell's Colors
Swift
408
star
20

AsyncCompatibilityKit

iOS 13-compatible backports of commonly used async/await-based system APIs that are only available from iOS 15 by default.
Swift
378
star
21

Shapeshift

Quickly convert a folder containing Swift files into an iPad-compatible Playground
Swift
338
star
22

Identity

๐Ÿ†” Type-safe identifiers in Swift
Swift
298
star
23

SwiftBySundell

Code samples from the Swift by Sundell website & podcast
Swift
289
star
24

SuperSpriteKit

Extensions to Apple's SpriteKit game engine
Objective-C
224
star
25

Flow

Operation Oriented Programming in Swift
Swift
217
star
26

Xgen

A Swift package for generating Xcode workspaces & playgrounds
Swift
189
star
27

IndieSupportWeeks

A two-week effort to help support indie developers shipping apps on Apple's platforms who have been financially impacted by the COVID-19 pandemic.
182
star
28

CGOperators

Easily manipulate CGPoints, CGSizes and CGVectors using math operators
Swift
148
star
29

Animate

Declarative UIView animations without nested closures
Swift
129
star
30

SplashPublishPlugin

A Splash plugin for the Publish static site generator
Swift
92
star
31

Assert

A collection of convenient assertions for Swift testing
Swift
69
star
32

UITestingExample

Example code from my blog post about UI testing
Swift
67
star
33

Marathon-Examples

A collection of example Swift scripts that can easily be run using Marathon
Swift
55
star
34

Releases

A Swift package for resolving released versions from a Git repository
Swift
51
star
35

BlockSnippets

Xcode snippets that are very handy when working with blocks in various contexts
51
star
36

PlotPlayground

A Swift playground that comes pre-loaded with Plot, that can be used to explore the new component API.
Swift
49
star
37

SwiftKit

A collection of Swift utilities that I share across my Swift-based projects
Swift
38
star
38

UnitTestingWorkshop

Project used during my workshop "Getting started with unit testing in Swift"
Swift
36
star
39

JSUpdateLookup

A lightweight, easy to use Objective-C class to check if your iOS app has an update available
Objective-C
28
star
40

SwiftAveiro

Skeleton project for my Swift Aveiro workshop "Everyone is an API designer"
Swift
15
star
41

CloudKitChat

A demo chat application powered by CloudKit
Objective-C
14
star
42

swiftbysundell-beta-feedback

Submit your feedback on the Swift by Sundell 2.0 beta
9
star
43

JSGeometry

A set of utility functions that enables easy one-line manipulation of CoreGraphics geometry structs like CGPoint, CGSize & CGRect.
Objective-C
6
star
44

JSAutoCopy

An Objective-C category that enables automatic copying of any object
Objective-C
4
star
45

UnboxDemoPlayground

A Swift Playground that comes setup with Unbox & Wrap, used in my CocoaHeads Stockholm presentation
Swift
3
star
46

JSAutoEncodedObject

Automatically encode or decode any Objective-C object
Objective-C
3
star
47

JSLocalization

An Objective-C class that enables dynamic localization of an iOS app.
Objective-C
3
star
48

MarathonTestScriptWithDependencies

A test script with dependencies - used for Marathon's tests
Swift
2
star
49

JSObservableObject

Easily add protocol-based observation to any Objective-C class
Objective-C
2
star
50

MarathonTestScript

A Swift script that's used in Marathon's tests
Swift
1
star
51

MarathonTestPackage

A Swift package that's used in Marathon's tests
Swift
1
star