Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neved4/apputils
 Find macOS app paths!
https://github.com/neved4/apputils
cli command-line darwin fish-shell macos posix-shell script shell-script terminal
Last synced: 3 months ago
JSON representation
 Find macOS app paths!
- Host: GitHub
- URL: https://github.com/neved4/apputils
- Owner: Neved4
- License: mit
- Created: 2024-07-09T07:57:38.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T21:45:36.000Z (6 months ago)
- Last Synced: 2024-07-13T12:32:49.179Z (6 months ago)
- Topics: cli, command-line, darwin, fish-shell, macos, posix-shell, script, shell-script, terminal
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![macOS](https://img.shields.io/badge/macOS-000000?style=flat&logo=apple&logoColor=fff)
![POSIX.1%2D2017](https://img.shields.io/badge/POSIX.1‑2017-00629B?logo=ieee&logoColor=fff&style=flat)
![Shell Script](https://img.shields.io/badge/Shell_Script-4EAA25?logo=gnubash&logoColor=fff&style=flat)
![Fish Shell](https://img.shields.io/badge/fish%20shell-34C534?logo=fishshell&logoColor=fff&style=flat)## `apputils` - Find macOS app paths! 🚀
[`apputils`] is a collection of shell functions to find application bundle
paths.Available for POSIX shells (e.g. [`bash`], [`ksh`], [`zsh`]) and [`fish`].
Built on `mdfind`.## Getting Started
> [!NOTE]
> This utility is meant to only be run on [macOS].### Prerequisites
Before using [`apputils`], ensure you have:
- A _POSIX compatible shell_, or [`fish`].
- [macOS] with `mdfind` command available.### Installation
To directly source the scripts and use their functions in your environment:
```sh
$ . /path/to/repo/app.sh
$ appdir 'Docker'
```If you have [`brew`] installed, just run:
```console
$ brew install Neved4/tap/apputils
```Otherwise, clone the repository or download the script files directly:
```console
$ git clone https://github.com/Neved4/apputils.git
```Navigate with `cd` into the project directory and then run:
```console
$ ./install.sh
```## Usage
The following options are available:
```sh
usage: app command [options]Options:
-i Perform case-insensitive matchingCommands:
list List all installed apps.
find List application full path.
dir List application parent directory.
```When added to your shell profile, the following functions are in your
environment:
```sh
applist List all installed apps.
appfind List application full path.
appdir List application parent directory.
```## Examples
_List all installed application bundles_:
```sh
$ app list
```_Find the path of the application bundle, case-insensitive_:
```sh
$ app find -i 'Docker'
```_Retrieve the directory containing the application bundle_:
```sh
$ app dir 'Docker'
```_Call the former commands as functions in your shell profile_:
```sh
$ applist
/Applications/Safari.app
/System/Applications/Notes.app
/System/Applications/Preview.app$ appfind -i 'docker'
/Applications/Docker.app$ appdir 'Docker'
/Applications
```## Standards
The [app.sh](app.sh) script is compatible with [ISO
9945:2009][POSIX.1-2017], also known as [POSIX.1-2017].[^posix]## License
[`apputils`] is licensed under the terms of the [MIT License].
See the [LICENSE](LICENSE) file for details.[^posix]: _IEEE Std 1003.1-2017: Standard for Information Technology — Portable_
_Operating System Interface (POSIX®)_, ISO/IEC/IEEE 9945:2009/COR
2:2017. URL: https://pubs.opengroup.org/onlinepubs/9699919799/[`apputils`]: https://github.com/Neved4/apputils
[`bash`]: https://www.gnu.org/software/bash/
[`brew`]: https://brew.sh/
[`fish`]: https://fishshell.com/
[`ksh`]: http://kornshell.com/
[`zsh`]: https://www.zsh.org/
[macOS]: https://www.apple.com/macos/
[MIT License]: https://opensource.org/license/mit/
[POSIX.1-2017]: https://pubs.opengroup.org/onlinepubs/9699919799/