Episode #464

Command Line Apps In Swift - Parsing Arguments

Series: Command Line Swift

13 minutes
Published on October 16, 2020

This video is only available to subscribers. Get access to this video and 504 others.

I use a collection of command line scripts that help me in the production of NSScreencast episodes. Most are written in Ruby, which is a language I know and love, and some are written in bash, which is... a language. I sometimes wonder what these scripts would look like if I were to write them in Swift. So in this new series I'm going to explore rewriting a script that I use to encode videos using Swift. In this episode we'll bring in the excellent Swift Argument Parser library and use it to give us a clean and consistent command line interface to start with.

This episode uses Swift 5.3, Swift argument-parser-0.3.1, Nova 1.2.