Skip to content

willfarrell/alfred-pkgman-workflow

Repository files navigation

Package Managers (Download latest release)

Package Repo Search

Quick package/plugin/component (repo) lookup for your favourite package managers.

Featured on Smashing Magazine in 2013.

PATH Variable

With macOS ≥12.3 Monterey no longer providing PHP, it's now a prerequisite to install your own. Simplest way to install it yourself is via brew install php.

If you don’t have Homebrew, you can install it via instructions on their homepage, brew.sh.

The PATH variable needs to capture not only where PHP is installed, but also where Bash is. Here are two variations:

  • Intel Macs: /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
  • Apple Silicon Macs: /opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin

The workflow has this set as its default $PATH so it will work on either style of Mac.

/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}

Commands

Local Cache Management Commands

  • pkgman cleardb: Clear local database cache files
  • pkgman cachedb: Update local database cache files

Package Repository Search Commands

Action Modifiers

  • default: open README page url
  • cmd: copy name/id to frontmost app
  • shift: copy config file name/id and version to frontmost app

Additional Notes

All workflows require an internet connection.

Workflows can break from time to time due to changes by the provider of the repo. If you notice a workflow stops working, please file an Issue.

All repos have caching enabled to speed up common queries. These caches are refreshed after 14 days and may take longer than expected to return results during update. You can force a cache refresh by running pkgman cachedb to re-download the databases (applies to alcatraz, grunt, cocoa). Alternatively you can run pkgman cleardb to remove all stored cache, but this isn't recommended. Clearing your cache is recommended after an update if the package manager you use had a bug previously.

The Python Package Index is very slow due to a lack on API and pagination. A min query length has been put in place to help speed this up. You can change it in the script, $min_query_length = 3. Perhaps someone with a python background can improve this.

Contribution

Please see CONTRIBUTING.md for details

Alcatraz sample results Bower sample results Chef sample results CocoaPods sample results Composer sample results Docker sample results Grunt sample results Gulp sample results Hex sample results Homebrew sample results Maven sample results Metacran sample results NPM sample results PEAR sample results PyPi sample results RPMfind sample results Rubygems sample results Sublime Text sample results Yarn sample results Yo sample results