Forrest logo
tool overview
On this page you find all important commands for the CLI tool open. If the command you are looking for is missing please ask our AI.

open

The open command is a command line tool used in various operating systems, including Unix-based systems like macOS. It is primarily designed to open files and directories from the command line. When used with a file as an argument, it launches the default application associated with that file type. For example, using "open file.txt" will open file.txt with the default text editor. Alternatively, when used with a directory, it opens the directory in the default file manager. It can also open URLs, allowing users to launch websites or download files directly from the command line. The open command offers some additional options, such as specifying the application to open a file with, opening files in a new window, and opening files in the background without bringing them to the front. Overall, open simplifies the process of accessing files and directories through the command line interface.

List of commands for open:

  • open:tldr:037e2 open: [R]eveal a file in Finder.
    $ open -R ${filename}
    try on your machine
    explain this command
  • open:tldr:2ebea open: Open the current directory in Finder.
    $ open .
    try on your machine
    explain this command
  • open:tldr:9c76d open: Run a graphical macOS app based on the [b]undle identifier (refer to `osascript` for an easy way to get this).
    $ open -b ${com-domain-application}
    try on your machine
    explain this command
  • open:tldr:d91ec open: Open a file with the associated application.
    $ open ${file-ext}
    try on your machine
    explain this command
  • open:tldr:e436c open: Open a [n]ew instance of an application specified via [b]undle identifier.
    $ open -n -b ${com-domain-application}
    try on your machine
    explain this command
  • open:tldr:f5de3 open: Run a graphical macOS [a]pplication.
    $ open -a "${Application}"
    try on your machine
    explain this command
tool overview