alfred-pkgman-workflow
alfred-pkgman-workflow copied to clipboard
Package Repo Search
Package Managers (Download latest release)
Package Repo Search
Quick package/plugin/component (repo) lookup for your favourite package managers. Currently supports Alcatraz to Yeoman Generators.
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
Commands
Local Cache Management Commands
pkgman cleardb: Clear local database cache filespkgman cachedb: Update local database cache files
Package Repository Search Commands
alcatraz {query}: Cocoa Packagesatom {query}: Atom Packagesapt-get {query}: Ubuntu Packagesbower {query}: Bower Components for JavaScriptbrew {query}: Homebrew Forumale/Caskchef {query}: Chef Cookbookscocoa {query}: CocoaPods can be upgraded to CocoaDocs by changing$apple_docsto true in the script.composer {query}: PHP Composer Packagescordova {query}: Apache Cordova pluginsdocker {query}: Docker Imagesdefinitelytyped {query}: DefinitelyTyped TypeScript Definitionsgems {query}: Ruby Gemsgradle {query}: Java Gradle Packagesgrunt {query}: nodeJS task-runner Grunt Pluginsgulp {query}: nodeJS task-runner Gulp Pluginshackage {query}: Haskell package archivehex {query}: Elixir Hex Packagesmaven {query}: Java Maven Librariesmetacran {query}: R Packagesnpm {query}: nodeJS NPM Packagesnuget {query}: .Net NuGet Packagespear {query}: PHP Pear Packagespuppet {query}: Puppet Modulespypi {query}: Python Packagesraspbian {query}: Rasberry Pi Packagesrpm {query}: Red Hat Linux Packagesst {query}: Sublime Text Packagesyarn {query}: Yarn Packagesyo {query}: Yeoman Generators
Action Modifiers
default: open README page urlcmd: copy name/id to frontmost appshift: copy config file name/id and version to frontmost app
Additional Notes
All workflows require constant 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
There is a Makefile to automate the contribution steps. This Makefile have one prerequisite: you should set ALFRED_PKGMAN_WORKFLOW_DIR shell environment variable targeting to workflow path installed in Alfred. To get the path you should:
- Go Alfred Preferences → Workflows
- Find “Package Managers”
- Right click on it and select “Open in Finder”
To make a contribution:
- Make desired changes to workflow / underlying code base
- Build the Alfred workflow
- Prepare a new release:
- Update
Package Managers.alfredworkflowfile in the root of repository from your newly-built one - Update
info.plistin the root of the repository
- Update
See below for how to run the automation that handles these steps.
Make changes to workflow / underlying code base
make linkSourceFoldersToWorkflow - links src, bin, vendor folders from your local cloned source code folder of the workflow to corresponding folders that installed in Alfred, located at ALFRED_PKGMAN_WORKFLOW_DIR.
Build the Alfred workflow
make dist - runs composer install, copies sources to ./dist, copies icons and info.plist from ALFRED_PKGMAN_WORKFLOW_DIR to ./dist, zips ./dist to ./dist/Package Managers.alfredworkflow
Prepare a new release
make release - builds a new release by copying info.plist and Package Managers.alfredworkflow from ./dist to the root of the repository.
![Atom logo][atom]
![Metacran logo][metacran]

Featured on Smashing Magazine