Controlling the Mac user interface from the shell
The Mac OS X shell has several Mac-only commands for communicating with the graphical user interface (GUI). They are useful in three cases: First, when switching back and forth between shell and GUI. Second, when interacting with the system from a language that is not Objective C or AppleScript: Bash, Node.js [1] , Python etc. open The open command performs multiple tasks. The following subsections give an overview, consult the man page for complete documentation: man open If you use open programmatically (instead of interactively via a shell) then it helps to know the long forms of the options. You can list those by calling open without any arguments. open open and files You can use open to work with files: Open a folder in the Finder: open . Open a file in the application that has been associated with it (which can be overridden per file): open index.html Reveal a file in the Finder (instead of opening it): open -R index.html Open a ...