Is it possible to create a service using only the shell and bypassing automator altogether

automatorbashscriptterminal

Using automator is somewhat of a tedious task. Using the shell in the Terminal is much easier all around. Even using the "Run Shell Script" action inside automator is not the same as using the actual shell in the Terminal. A script that works normally in the Terminal may break in Automator. Then editing requires opening Automator again (I have a habit of quitting the program assuming everything will work) and waiting on everything to load. So I thought, why am I even using this program? But then when I start thinking about creating a service, I realized that I have no idea how to go about it without the slow and clunky Automator application. Is this even possible?

Best Answer

Having read through the Services Implementation Guide I'm going to have to say no to using only a shell script. If you do not want to use Automator then you'll have to create a Service using Xcode and unless you can perform that level of programming, then Automator, as slow and clunky as it may be, is looking pretty good.

Just for the heck of it, I took what I learned from reading the Services Implementation Guide and was able to manually wrap the shell script in an application bundle with an appropriate Info.plist file that did make an entry on the Services menu in Finder as I coded in the .plist file. However, that's were things stopped as there was no mechanism within to pass what was selected in Finder to the shell script, masquerading as a Service in this case, like what the Automator Service takes care of automatically without one having to resort to Xcode.

In closing... Automator, as slow and clunky as it may be, is the easiest way to create a Service for the non-programmer average everyday user of OS X.