https://github.com/quackduck/tii
Command not found? Install it right there!
https://github.com/quackduck/tii
bash command-not-found fish macos zsh
Last synced: about 1 year ago
JSON representation
Command not found? Install it right there!
- Host: GitHub
- URL: https://github.com/quackduck/tii
- Owner: quackduck
- License: mit
- Created: 2021-01-03T06:01:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-04T06:34:22.000Z (almost 3 years ago)
- Last Synced: 2025-04-23T01:49:51.051Z (about 1 year ago)
- Topics: bash, command-not-found, fish, macos, zsh
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 41
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-hackclub - Tii - [@quackduck](https://github.com/quackduck) - **(Go)** _Command not found on macOS? Install it right there!_ (CLI Tools)
README
# Tii
On most GNU/Linux systems, when a command isn't found, a message showing what
to run to install the command is shown. However, macOS doesn't have
this.
This tool adds a similar function with support for macOS using
the Homebrew package manager. Instead of simply printing the best matches, Tii shows package
descriptions and also offers to run an install command for you.
[comment]: <> ([](https://asciinema.org/a/382511?autoplay=1&speed=2))
The name Tii is an acronym for "Then Install It", which is what you'll probably say when shown "Command not found".
## Installing
As of now, only macOS is supported
```shell
brew install quackduck/tap/tii
```
## Usage, environment and files
Tii will be automatically triggered if a command is not found and so you usually do not need to directly interact with it.
```text
Usage: tii [--help/-h | --version/-v | --refresh-cache/-r | ]
Examples:
tii fish
tii cowsay
tii --help
Environment:
TII_DISABLE_INTERACTIVE: If this variable is set to "true", Tii will
disable interactive output (prompting for confirmation) and not install
any packages.
TII_AUTO_INSTALL_EXACT_MATCHES: If this variable is set to "true", Tii will
automatically install exact matches without prompting for confirmation
Files:
$XDG_DATA_HOME/tii: used to cache package list info. If $XDG_DATA_HOME is
not set, ~/.local/share is used instead. Refresh the cache using the
--refresh-cache option.
```
## Uninstalling
If you have issues with Tii, head over to [issues](https://github.com/quackduck/tii/issues).
You can uninstall with:
```shell
brew uninstall tii
```
Here's a list of all the files Tii uses:
```text
/usr/local/bin/tii
/usr/local/share/fish/vendor_functions.d/tii_on_command_not_found.fish
/etc/profile.d/tii_on_command_not_found.sh
$XDG_DATA_HOME/tii or ~/.local/share/tii
```
## Any other business
Have a question, idea or just want to share something? Head over to [Discussions](https://github.com/quackduck/uniclip/discussions)