Running CLI Applications - Mac
This page will help you to understand how to run a CLI application from SKAARHOJ Innovation Lab on Mac. CLI means "command line interface" and it's the kind of geeky programs that need to get started from a black window with white text... sigh. The world is unfair, I know. But help is here.
The example below is based on the popular Raw Panel emulator called "Raw Panel Dummies" (it emulates any SKAARHOJ panel so you can easily and freely get started on integrating support in your hardware or software applications). The principles will however be the same for any CLI application from SKAARHOJ, you just need to change the filenames.
- Download the relevant application.
For example, raw-panel-dummies is downloaded from from https://github.com/SKAARHOJ/raw-panel-dummies-releases/releases. For Mac, look for files that says "darwin" or "mac" in the filename, eg. "raw-panel-dummies_1.0.0_darwin_amd64" for Intel Macs or "_arm64" for M1 macs
- Open the download folder in Terminal
In Finder, right click the download folder, select "Services", select "New Terminal at Folder".
If you can't see you Downloads folder in this way, right click the Downloads folder in finder and select "Show in Enclosing Folder"
- Set "execute" permissions
In the Terminal window that opened, type in
chmod +x [filename of downloaded file]
and Enter. This will set permissions to run the application.
- Run it first time and manage security settings
Now, try to run the application like this:
Security will kick in some way: When prompted, press OK, then go to Settings > Security & Privacy and press "Allow Anyway"
- Run it again until it is accepted
Try to run the application again. It may ask a security related question once more. Just press "Open", "OK" or "Yes" and try once more.
Eventually, you should see something like this:
- Run it with options
You are now ready to run it for real, so type in
./raw-panel-dummies_1.0.0_darwin_arm64 -panel PTZFLY
and Enter. This will emulate a PTZ Fly panel.
Try other options, especially "-h" of "-list"
- UI - yes!
Many applications will have a sort of UI, it will open automatically in a web browser
Every application will be different. For Raw Panel Dummies that emulates a panel, here is an example of how to use the application: You can now connect with Telnet (or "nc") to the panel on port 9923 of your computer. Notice, the emulator runs Raw Panel in server mode. Type in "list" + Enter to identify as an ASCII client and try to press a button on the PTZ Fly emulated panel in the browser - you should see something like this:
Let us know if you are still in trouble. Reach SKAARHOJ Innovation Lab on email@example.com or try to contact SKAARHOJs support team on firstname.lastname@example.org