Commands allows you to execute commands from within your application or via the command line tool Commands
You can build and run an example from the command line:
$ swift build Compile Swift Module 'CommandsCore' (3 sources) Compile Swift Module 'Commands' (1 sources) Linking ./.build/x86_64-apple-macosx10.10/debug/Commands $ ./.build/x86_64-apple-macosx10.10/debug/Commands '/usr/bin/irb' Switch to inspect mode. >> 1+1 1+1 => 2 >> exit exit
It's more fun to do it within Xcode though:
$ swift package generate-xcodeproj generated: ./Commands.xcodeproj
Open the project add a launch argument to the Commands target's run phase.
$ open Commands.xcodeproj
The target is now configured to run an example with the Interactive Ruby Shell (IRB) to be launched. Select the Commands scheme and My Mac as target and hit the run button.
Have fun 🐼