~/talk

Building command-line user experiences with Swift

Talkat SwiftLeeds 2023 · 2023-10-09..10-10· [swift, developer-experience]
slides:none on file

Builds a real MusiCLI that searches Apple Music via MusicKit and can open a SwiftUI window from the terminal. Uses Swift Package Manager and swift-argument-parser (AsyncParsableCommand) with readLine for input, requests MusicKit auth, hits a missing bundle identifier error and fixes it by embedding an Info.plist bundle trick (Xcode: create info plist section in binary or matching linker flags in SPM). Styles output with ANSI sequences using AnsiTerminal and a spinner library, and launches NSApplication + HostingController to display artwork — end-to-end working demo.

AI-written summary · about

  1. 0:00Introduction and background
  2. 2:30Why build with Swift
  3. 6:52Building your first tool
  4. 11:34Handling bundle identifiers
  5. 16:56Styling the command line
  6. 24:55Advanced scaling with SwiftUI
  7. 29:43Final tips and conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.