I’m a big fan of productivity tools. A particular tool that I use every day is Alfred. Alfred is customizable and supports Workflows to further enhance your experience. When I work on iOS apps, I find myself going to a dependency’s source or searching for a certain iOS library.

The Pods workflow helps with searching for pods and copying the pod 'Pod'{:ruby} stanza to your clipboard.

Usage

To use the workflow, you use the pods{:plain} prefix plus your query

pods rx

Searching for rx

Pressing Enter{:plain} or ⌘+[1-9]{:plain} will open the page for that CocoaPod.

Copying To Podfile

Once you have a pod, you can press ⌘+C{:plain} to copy the code to your clipboard. For example, if you selected RxCocoa, the clipboard contents would look like:

pod 'RxCocoa'

Opening the Source

Alfred Workflows support alternative actions when a user has Option/Alt, Control, Command, or Shift pressed. To open the source for the current Pod, press Option+Enter{:plain}.

How Do I Get It?

npm install -g alfred-pods
# or with yarn
yarn global add alfred-pods

Binary version

After a few months, I decided to rewrite it in Rust to make installation much simpler. Now you can download the pure alfredworkflow{:sh} without installing anything else.

Download the latest version