{"id":18748869,"url":"https://github.com/soliez/mac-utils","last_synced_at":"2025-10-26T12:35:24.409Z","repository":{"id":248990006,"uuid":"819217039","full_name":"Soliez/mac-utils","owner":"Soliez","description":"A collection of useful (mostly macOS specific) shell scripts ","archived":false,"fork":false,"pushed_at":"2025-04-06T20:41:55.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T21:31:27.345Z","etag":null,"topics":["apple","bash","bash-script","bash-scripting","mac","macos","shell","shell-scripting","shell-scripts","utilities","utility","utils"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Soliez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-24T04:32:13.000Z","updated_at":"2025-04-06T20:41:58.000Z","dependencies_parsed_at":"2024-08-24T07:48:25.661Z","dependency_job_id":"81959b74-0bb5-495e-81c2-09116180f058","html_url":"https://github.com/Soliez/mac-utils","commit_stats":null,"previous_names":["soliez/mac-utils"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fmac-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fmac-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fmac-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Soliez%2Fmac-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Soliez","download_url":"https://codeload.github.com/Soliez/mac-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248243511,"owners_count":21071055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","bash","bash-script","bash-scripting","mac","macos","shell","shell-scripting","shell-scripts","utilities","utility","utils"],"created_at":"2024-11-07T17:05:14.822Z","updated_at":"2025-10-26T12:35:24.336Z","avatar_url":"https://github.com/Soliez.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Repo Banner](Media/Mac-Utils%20Repo%20Banner.png)\n\n\n# Getting Started\n\nTo get started using the tools in this repository first install them using one of the methods below.\n\n\u003cbr\u003e\n\n# Automated Installation (Makefile)\n\n## Step 1: Clone this repository\n\n```bash\ngit clone https://github.com/Soliez/mac-utils.git\n```\n\n## Step 2: Run the Makefile\n\nFirst, `cd` into the project directory.\n\n```bash\ncd mac-utils\n```\n\nThen, run the following `make` command.\n\n### `zsh`\n```bash\nmake install\n```\n\n### `bash`\n```bash\nmake install PROFILE=~/.profile\n```\n\n### Other shells\n```bash\nmake install PROFILE=\u003cpath-to-shell-profile\u003e\n```\n\n\u003e If you use a shell other than `bash` or `zsh`, replace `\u003cpath-to-shell-profile\u003e` with the path to your shell profile file in the above command\n\n\u003cbr\u003e\n\n# Manual Installation\n\n## Step 1: Install Command Line Tools for Xcode and a package manager\n\nPlease ensure you have installed a package manager such as [`homebrew`](https://brew.sh) as well as Apple's [`Command Line Tools for Xcode`](https://developer.apple.com/download/all/) package. You can install them with the following command.\n\n\n```bash\nxcode-select --install\n```\n\nPlease ensure you have them installed in order to use all the tools in this repository.\n\n## Step 2: Clone this repository\n\nClone this repo with git and `cd` into it\n\n```bash\ngit clone https://github.com/Soliez/mac-utils.git \u0026\u0026 cd mac-utils\n```\n\n## Step 3: Install external command-line dependencies\n\nSome of the scripts in this repository require you to install an external dependency to use.\n\nThese dependencies include:\n\n- [`exiftool`](https://exiftool.org) - Perl lib for reading and writing EXIF metadata\n- [`jq`](https://jqlang.github.io/jq/) - Lightweight and flexible command-line JSON processor\n- [`man2html`](https://savannah.nongnu.org/projects/man2html/) - Convert nroff man pages to HTML\n- [`pandoc`](https://pandoc.org/) - Swiss-army knife of markup format conversion\n- [`ffmpeg`](https://ffmpeg.org/) - Media Converter\n- [`tree`](https://oldmanprogrammer.net/source.php?dir=projects/tree) - Display directories as trees (with optional color/HTML output)\n\nYou can install each of these via [Homebrew](https://brew.sh) with the following one-liner.\n\n```bash\nbrew install exiftool jq man2html pandoc ffmpeg tree\n```\n\n## Step 4: Install python dependencies in a new virtual environment\n\nA few of the tools in this repository are written in `python`.\n\nMost of the functionality offered by these scripts is implemented using standard library modules.\n\n**Currently**, there is a total of (`1`) external dependencies that tools in this repo rely on.\n\n- [`pyobjc`](https://github.com/ronaldoussoren/pyobjc) - The Python \u003c-\u003e Objective-C Bridge with bindings for macOS frameworks\n\nYou can install each of these using [`pip`](https://pypi.org/project/pyobjc/), but first you'll have to create a new **virtual environment** (`venv`) in your local version of this repo's project directory\n\n### \u003cins\u003e**First**\u003c/ins\u003e:\n\nRun the following `python` command. This will create a new `venv` directory.\n\n\n```bash\npython3 -m venv venv\n```\n\n### \u003cins\u003e**Next**\u003c/ins\u003e:\n\nInstall the python dependencies with the following `pip` command.\n\n```bash\nvenv/bin/pip install --upgrade pip \u0026\u0026 venv/bin/pip install -r requirements.txt\n```\n\n\u003e 💡 These two examples assume you haven't changed directories since [\u003cins\u003e**Step 2**\u003c/ins\u003e](https://github.com/Soliez/mac-utils?tab=readme-ov-file#step-2-clone-this-repository)\n\n### \u003cins\u003e**Last**\u003c/ins\u003e:\nYou will need to update the shebang line in the scripts that need to use the `venv` you created.\n\nThis is necessary in order to run these scripts without having to manually activate the virtual environment with `source venv/bin/activate` every time you open a new terminal tab.\n\nYou can perform the shebang update to the scripts (currently it's just one) using the following commands.\n\n```bash\nshebang_queue=\"uti\"\nfor file in $shebang_queue; do \\\n    path=\"$PWD/bin/$file\"\n    sed -i '' \"1s|.*|#!$path|\" \"$path\"\n    chmod +x $path\ndone\n```\n\n\u003e 💡 This example assumes you haven't changed directories since [\u003cins\u003e**Step 2**\u003c/ins\u003e](https://github.com/Soliez/mac-utils?tab=readme-ov-file#step-2-clone-this-repository)\n\n\u003c/br\u003e\n\n## Step 5: Install the utility shortcuts used internally by `shortcut-util`\n\n`shortcut-util` is a feature rich command-line utility for [Shortcuts](https://apps.apple.com/us/app/shortcuts/id915249334) power-users and scripting enthusiasts.\n\nThere are some subcommands this tool implements that have to interface with with the Shortcuts app internally (though not in a way that impacts the scriptability or that requires using a GUI) \n\nFor example, `shortcut-util` currently uses an [Internal Utility Shortcut](shortcuts/Shortcut%20to%20Plist%20Non-Interactive.shortcut) to fetch your Shortcuts for processing within the script before any signing occurs\n\n### Installing the utility shortcuts:\n\nInstall the required utility shortcuts manually, or all at once with the following command.\n\nYou will have to manually tap 'Add Shortcut' for each item when the dialog appears\n\n```bash\nfor workflow in $PWD/shortcuts/*; do\n\topen -a Shortcuts \"$workflow\"; \\\ndone\n```\n\n\n\u003e 💡 This example assumes you haven't changed directories since [\u003cins\u003e**Step 2**\u003c/ins\u003e](https://github.com/Soliez/mac-utils?tab=readme-ov-file#step-2-clone-this-repository)\n\n\n## Step 6: Add the repository's `bin` directory to your `PATH`\n\nYou will need to add the project's `bin` directory to your `PATH` variable to be able to call each script without providing it's full path each time.\n\nTo enable this, add the following lines to your shell profile file (i.e `~/.profile` or `~/.zprofile`)\n\n```bash\n# Add mac-utils repository tools to PATH\nexport PATH=\"/path/to/mac-utils/bin:$PATH\"\n```\n\u003e In this example, replace `/path/to/mac-utils/bin` with the full to path to the `bin` directory in the mac-utils repository on your computer.\n\n\n## Step 7: Add the project's manual pages to `MANPATH`\n\nTo get help on any of the scripts in this repository you can view it's manual page using `man \u003cSCRIPT-NAME\u003e` or by calling the script with its `-h` or `--help` flag.\n\nTo enable this, first run the following commands \n\n```bash\n# Create a local man directory in your home directory if it dosen't already exist\nmkdir -p ~/man/man1\n\n# Copy all of the project's manual pages to your local man directory\ncp /path/to/mac-utils/man/*.1 ~/man/man1\n```\n\n\u003e In this example, replace `/path/to/mac-utils/man` with the full to path to the `man` directory in the mac-utils repository on your computer.\n\n\u003cbr\u003e\n\nNext, add the following lines to your shell profile file (i.e `~/.profile` or `~/.zprofile`)\n\n```bash\n# Add mac-utils repo man pages to MANPATH\nexport MANPATH=\"$HOME/man/man1:$MANPATH\"\n```\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliez%2Fmac-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoliez%2Fmac-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoliez%2Fmac-utils/lists"}