#alfred-workflow #workflow #alfred


⚡ Supercharge your Alfred workflows by building them in Rust!

12 releases

0.5.0 Dec 31, 2023
0.4.2 Sep 20, 2022
0.4.1 Mar 20, 2022
0.2.1 Sep 4, 2021
0.1.0 Mar 31, 2021

#469 in Command line utilities

Download history 15/week @ 2024-02-12 7/week @ 2024-02-19 76/week @ 2024-02-26 16/week @ 2024-03-04 31/week @ 2024-03-11 16/week @ 2024-03-18 51/week @ 2024-04-01 5/week @ 2024-04-08 14/week @ 2024-04-15 17/week @ 2024-04-22 15/week @ 2024-04-29

55 downloads per month


360 lines

⚡ powerpack

Crates.io Version Docs.rs Latest Build Status

Supercharge your Alfred 🎩 workflows by building them in Rust 🦀!

🚀 Getting started

This project contains a powerpack crate which provides types for developing script filter Alfred workflows in Rust. It also provides a command line tool to initialize, build, and install workflows built using the powerpack crate.

Firstly, install the command line tool.

cargo install powerpack-cli

Now create a new project using a similar API as cargo new or cargo init.

powerpack new myworkflow && cd myworkflow

This will create a new Rust project as well as a workflow/ directory containing information about your Alfred workflow. The following will create a release build of the workflow and copy it to the workflow/ directory.

powerpack build --release

Now you can link it to Alfred. The following will symlink the workflow/ directory to the Alfred preferences folder.

powerpack link

Now you can run the workflow from Alfred ✨!

To package a .alfredworkflow file for release you can run the following.

powerpack package

The release will be available at target/workflow/myworkflow.alfredworkflow.

🤸 Usage

The following is a "Hello World!" Alfred workflow built using powerpack.

use std::env;
use std::error::Error;
use std::iter;

fn main() -> Result<(), Box<dyn Error>> {
    // Alfred passes in a single argument for the user query.
    let arg = env::args().nth(1);
    let query = arg.as_deref().unwrap_or("");

    // Create an item to show in the Alfred drop down.
    let item = powerpack::Item::new("Hello World!")
        .subtitle(format!("Your query was '{}'", query));

    // Output the item to Alfred!


This would render an item as shown.


👷 GitHub Action

setup-crate can be used to install powerpack in a GitHub Actions workflow. For example:

  - uses: actions/checkout@v2
  - uses: extractions/setup-crate@v1
      owner: rossmacarthur
      name: powerpack
  - run: powerpack package
  # produces an artifact at `target/workflow/{name}.alfredworkflow`

💡 Examples

The following projects are built using powerpack.


Licensed under either of

at your option.


~33K SLoC