Make command line app behave like a normal macOS app?
Is it possible to make a command line app behave and act like a normal Cocoa app?
I want to be able to set command line app Zathura, for example, as a default pdf viewer.
I want it to appear in Alfred/Spotlight when I search for it, and if an instance is already running, typing "Zathura" and then Return would bring up that instance instead starting a new one.
Solution 1:
The answer is in your question... an application written for the command line is not a Cocoa app, so it won’t behave like one.
Apps designed to run in the GUI environment of macOS has a “payload” attached to them including a plist that “describes” it to the OS and is used in registering the app with LaunchServicres. Zathura has none of this.
Solution 2:
There is an app called Platypus which will take shell scripts or python scripts and make them into an app that you can just double click to run. The app is free. I use it to convert python scrips but it also works for command line scripts.