📋A hand-curated collection of useful and informative Swift Scripting materials.

Overview

Articles Videos

Articles

Creating iOS Application Icons with SwiftUI

by Eneko Alonso

An interesting way to use SwiftUI with CLI for icon generation.


Announcing ArgumentParser

by Nate Cook

Swift team have released type-safe argument parsing framework.


The Ultimate Guide To Swift Executables 🚀

by Federico Zanetello

Just as described in the name of the article.


Creating a command line tool using the Swift Package Manager

by Antoine v.d. SwiftLee

Basic guide about SPM tools with simple one-command installation.


Command-line argument parsing using Swift Package Manager's SPMUtility module

by Derik Ramirez

The article contains a detailed example of generation Bash/Zsh autocomletion for SPM projects.


Using Swift for scripting

by Derik Ramirez

Good article to start with scripting.


A RunLoop for your Swift script

by Alejandro Martinez

Using async operations in your scripts is simpler than you think.


swift-sh

by Mattt

An article about a project that adds dependencies to your scripts.


Swift Tip: Using AppKit from the Command-line

by objc.io

Explanation of using GUI in your Swift scripts.


Apple's new Utility library will power up command-line apps

by Paul Hudson

Examples of using Utility framework. ArgumentParser and TerminalController are really useful.


Building a command line tool using the Swift Package Manager

by John Sundell

Personally my favorite article. In format of tutorial with recommendations based on real experience.


Scripting and Compiling Swift on the Command Line

by Jason Blevins

A simple introduction to Swift Scripting with Fibonacci Sequence.


Introduction to the Swift REPL

by Apple

Interactive Swift sessions right in your console.


Command Line Swift

by Russ Bishop

Working with different toolchains. Might be helpful for Server-side Swift projects 🤔


Command Line Programs on macOS Tutorial

by Eric A. Soto

Step-by-step tutorial with output streams, command-line arguments, and interactive input.


Swift Package Manager macOS deployment target override

by Ole Begemann

As you can understand from the title, the author writes about deployment target overriding in Swift Script project.


Handling Commands with Swift Package Manager ArgumentParser

by Eneko Alonso

Want to use ArgumentParser like a pro? You should definitely read this.


How to fuzz-test a Swift package

by Loïc Lecrenier

Advanced technique of SPM package testing - fuzz-testing via libFuzzer.


How to Build Swift Compiler-Based Tool? The Step-by-Step Guide

by Krzysztof Siejkowski

Awesome guide about using Swift compiler in your CLI tools.

Videos

UIKonf 2020 - Federico Zanetello - Swift Scripts: Zero to Hero

by Federico Zanetello

Every iOS/macOS developer uses (scripting) tools such as fastlane and swiftLint to automate tasks as much work as possible: in this talk we will dive into how we can build our own Swift scripts.


Scripting in Swift For a Testable Build

by Ellen Shapiro

Underlying many large iOS projects is a tangled nest of bash scripts that developers are often afraid to touch for fear of breaking something, and which is littered with print statements from generations of developers trying to figure out how on earth it works. How can we move away from this mess and to something more sustainable? Ellen will discuss moving a codebase like this to a command line tool that can be called from a Swift script, and which can be tested and breakpointed, and just might save a tiny bit of your sanity.


Swift scripting in practice

by John Sundell

Awesome talk by open-source ninja. Contains real-world cases, good points, and live demo.


Swift Scripting Redux: Localization

by Ayaka Nonaka

Mix of Swift Scripting and Localization.


Swift Scripting

by Ayaka Nonaka

Old but good talk. Pay attention to Dependency Management section.

Author

Artem Novichkov, https://www.artemnovichkov.com/about

You might also like...
iOS command-line tool that allows searching and downloading ipa files from the iOS App Store

ipatool for iOS This is a port of Majd Alfhaily's ipatool adapted to run on iOS Build / Installation To build this, make sure you have AppSync install

The best command-line tool to install and switch between multiple versions of Xcode.
The best command-line tool to install and switch between multiple versions of Xcode.

The best command-line tool to install and switch between multiple versions of Xcode.

A way to build TUI apps with a layout system and API that's similar to SwiftUI.

terminal-ui A way to build TUI apps with a layout system and API that's similar to SwiftUI. We reimplemented parts of the SwiftUI layout system in the

A powerful command line tool for performing stoichiometry calculations on checmicals and chemical equations.

Stoichiometry Stoichiometry is a powerful command line tool for preforming stoichiometry chemicals and chemical equations. Its subcommands are listed

An extremely simple CLI tool that was created to diagnose and further understand an issue in DriverKit causing kIOHIDOptionsTypeSeizeDevice to behave incorrectly when used in DriverKit system extensions.

IOKitHIDKeyboardTester This tool is NOT useful to, or intended for general users. IOKitHIDKeyboardTester is an extremely simple (one-file!) CLI tool t

A command line tool to easily install and browse Xcode templates

🥾 XTrail A command line tool to easily install and browse Xcode templates. Usage The general invocation syntax for xtrail is as follows: xtrail subc

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

A command line tool to parse pricing from a pdf and generate an updated csv file for House Call Pro

A command line profiling tool with stopwatch, cpu and memory usage
A command line profiling tool with stopwatch, cpu and memory usage

timeui A command line profiling tool with stopwatch, cpu and memory usage. Usage ./timeui path/to/app-to-profile runs the stopwatch and signpost regio

RsyncOSX and RsyncUI are GUI´s on the Apple macOS plattform for the command line tool rsync
RsyncOSX and RsyncUI are GUI´s on the Apple macOS plattform for the command line tool rsync

Hi there 👋 RsyncOSX and RsyncUI are GUI´s on the Apple macOS plattform for the command line tool rsync. It is rsync which executes the synchronize ta

Owner
Artem Novichkov
Bearded iOS developer from Siberia 👨🏻‍💻
Artem Novichkov
Shell scripting in Swift

Shwift Shell-scripting in Swift DISCLAIMER: Shwift depends on Swift's incoming concurrency features. As such, it requires a recent Swift toolchain, an

George Lyon 32 Sep 15, 2022
This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "make it black" and change the background color of the view in the frame.

VoiceOperationSample This app is a sample app that recognizes specific voice commands such as "make it red", "make it blue", "make it green", and "mak

Takuya Aso 3 Dec 3, 2021
Util for executing shell commands, and getting the results easily(data, string, and any decodable).

ShellExecutor Util for executing shell commands, and getting the results easily(data, string, and any decodable). Requirements Xcode 14.0+ Swift 5.7+

Yozone Wang 2 Jul 30, 2022
Guaka - Smart and beautiful POSIX compliant CLI framework for Swift.

Guaka - Smart and beautiful POSIX compliant CLI framework for Swift. It helps you create modern and familiar CLI apps in the vein of widely used proje

Omar Abdelhafith 1.1k Dec 24, 2022
A library and CLI Utility to manage NVRAM Stuff, written in Swift.

NVRAMKit A Library and CLI Utility to manage NVRAM Stuff, written in Swift. Library Adding Library to Project Simply add this line to the dependencies

Serena 7 Sep 25, 2022
Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement.

Linenoise-Swift A pure Swift implementation of the Linenoise library. A minimal, zero-config readline replacement. Supports Mac OS and Linux Line edit

Andy Best 114 Dec 14, 2022
Swift tool to generate Module Interfaces for Swift projects.

ModuleInterface Swift tool to generate Module Interfaces for Swift projects. What is a Module Interface A Module Interface is what we commonly get usi

Jorge Revuelta 75 Dec 21, 2022
Swift-cli - Example of building command-line tools in Swift

swift-cli Example of building command-line tools in Swift Step 1: Create CLI wit

Noah Gift 2 Jan 17, 2022
ipatool is a command line tool that allows you to search for iOS apps on the App Store and download a copy of the app package, known as an ipa file.

ipatool is a command line tool that allows you to search for iOS apps on the App Store and download a copy of the app package, known as an ipa file.

Majd Alfhaily 3k Dec 30, 2022
Overlook - A commandline app that will watch your folder and monitor any changes

A commandline app that will watch your folder and monitor any changes. When a change occurs, Overlook will execute (or restart) a command you specify. Overlook is platform independent and will work with anything from writing a README file, to developing a service.

Wess Cope 150 Aug 9, 2022