Skip to content

Getting Started with swiftDialog

dialog -s --title "Welcome to swiftDialog" --message "Hi There. <br>It's really nice to see you 🙂"

swiftDialog Welcome Example

swiftDialog’s purpose is intended as a helper utility for macadmins to use via script to display a dialog to present information to a user and report the action the user took which can be later used for more script processing or simply used to display some piece of information.

swiftDialog accepts input from the command line with one or more command line options to tell swiftDialog what to display and how to display it.

There are a number of options available that can be used to customise what you want to show that can range from the very simplistic informational display to more complex processing with text entry, dropdown list, image display and more.

The .pkg installer from the releases page will install swiftDialog to /usr/local/bin/dialog which should also be in the default $PATH on macOS

To call dialog from your script, you can use the full path or rely on $PATH

Terminal window
$ dialog --title ...

or

Terminal window
$ /usr/local/bin/dialog --title ...

At the most basic level, dialog can simply use the --title and --message command line options to present a dialog with the desired message.

swiftDialog can perform much more than that though and you should read the Command Line Options page for a full list of options available or call dialog with the --help option.

swiftDialog was started in part as a learning exercise in how to write applications using SwiftUI and partly to satisfy a need for a way to communicate information to mac users in a style that I liked.

Support can be offered by creating an issue. Feature requests are also welcome.

You can reach the author over at the Macadmins slack in the #swiftdialog channel (username @bartreardon - usually hanging out in #anzmac) however please limit any support queries or general questions to github, at the very least so your problem can be tracked and addressed. Thank you 😃