On most GNU/Linux systems, when a command is not found, a message showing what can be run to install the command is printed. However, macOS does not have this.

This program adds a similar function for macOS (only for macOS, as of now). Instead of simply printing the command, Tii also offers to run it for you.


The name Tii is an acronym for “Then Install It”, which is what you will probably say when shown “Command not found”.


As of now, only macOS is supported

brew install quackduck/tap/tii


Tii will be automatically triggered if a command is not found and so you usually do not need to directly interact with it.

The Tii binary has the following usage:

Usage: tii [--help/-h | --version/-v | ]

   tii fish
   tii cowsay
   tii --help


These are the environment variables that can affect Tii:

  • If TII_DISABLE_INTERACTIVE is set to “true”, Tii will disable interactive output (prompting for confirmation) and not install any packages.

  • If TII_AUTO_INSTALL_EXACT_MATCHES is set to “true”, Tii will automatically install exact matches without prompting for confirmation. This variable overrides TII_DISABLE_INTERACTIVE.


If you have issues with Tii, head over to issues.

You can uninstall with:

brew uninstall tii

Here’s a list of all the files Tii uses:


Any other business

Have a question, idea or just want to share something? Head over to Discussions