PHPackages                             godbout/alfred-workflow-workflow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. godbout/alfred-workflow-workflow

ActiveLibrary[Templating &amp; Views](/categories/templating)

godbout/alfred-workflow-workflow
================================

Takes care of all the Alfred glue for you so that you need to code only what is specific to your Workflow.

1.3.0(4y ago)71.7kMITPHPPHP ^8.0.2CI failing

Since Jul 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/godbout/alfred-workflow-workflow)[ Packagist](https://packagist.org/packages/godbout/alfred-workflow-workflow)[ Docs](https://github.com/godbout/alfred-workflow-workflow)[ GitHub Sponsors](https://github.com/godbout)[ Fund](https://ko-fi.com/godbout)[ RSS](/packages/godbout-alfred-workflow-workflow/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (5)Versions (7)Used By (0)

PHP Alfred Workflow Workflow
============================

[](#php-alfred-workflow-workflow)

 [![Latest Stable Version](https://camo.githubusercontent.com/84500c9f5d33ccc1be1c8d9b523d21786ae8e5bd4fc5013f1efffb7a87b346ac/68747470733a2f2f706f7365722e707567782e6f72672f676f64626f75742f616c667265642d776f726b666c6f772d776f726b666c6f772f762f737461626c65)](https://packagist.org/packages/godbout/alfred-workflow-workflow) [![Build Status](https://camo.githubusercontent.com/0cb2144b755aee4135d8d4890df746c337650a23e80474d7c06c844a3e5cda56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f676f64626f75742f616c667265642d776f726b666c6f772d776f726b666c6f772f7465737473)](https://github.com/godbout/alfred-workflow-workflow/actions) [![Quality Score](https://camo.githubusercontent.com/15f6d9e26367aff855c28c816affa927459fa47d7738042a0dad17b44a534f38/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676f64626f75742f616c667265642d776f726b666c6f772d776f726b666c6f772e737667)](https://scrutinizer-ci.com/g/godbout/alfred-workflow-workflow) [![Code Coverage](https://camo.githubusercontent.com/d15dbac27d62c63ed62296b1408ceb07ee219f8a0e43eb903e31a8f9f9dd8509/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f676f64626f75742f616c667265642d776f726b666c6f772d776f726b666c6f772f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/godbout/alfred-workflow-workflow) [![Total Downloads](https://camo.githubusercontent.com/09c15c1b071fcbf7674945436bae38a8f8e93e1258fb604c84649b4e385ab6a8/68747470733a2f2f706f7365722e707567782e6f72672f676f64626f75742f616c667265642d776f726b666c6f772d776f726b666c6f772f646f776e6c6f616473)](https://packagist.org/packages/godbout/alfred-workflow-workflow)

 Tired of writing the same code over and over just to get your new Workflow up and running? Yeah me too.

---

DOUBLE WHAMMY WORKFLOW
----------------------

[](#double-whammy-workflow)

An [Alfred](https://alfredapp.com/) [Workflow](https://www.alfredapp.com/workflows/) does only two things:

```
1. show results
2. do an action
2.5. ok send a notification, maybe

```

which means, why typing over and over those same stuff over and over. I say stop to wasting keyboard keys. (Even more if you work on a MacBook because the keyboard will break soon.)

BUT WTF IS THAT, REALLY
-----------------------

[](#but-wtf-is-that-really)

Basically it's a set of base classes and some conventions and an Alfred Workflow Skeleton to get you up in no time. Follow the conventions and all you have to do is create your Menus, and your Actions. All the boring rest is handled by the Skeleton, and this package. The common glue is taken care of. You focus only on the specificity of your Workflow.

Installation
------------

[](#installation)

```
composer require godbout/alfred-workflow-workflow
```

The Conventions
---------------

[](#the-conventions)

Well this is where it gets interesting, because i'm still not sure how to express it. Best currently is to go through different use cases together. See the three cases below.

### Case 1: Alfred Ploi

[](#case-1-alfred-ploi)

This is the most straightforward Workflow. It doesn't override anything so it follows all the conventions, and only defines what it specifically needs.

1. Your Workflow Class only needs to define the possible actions of the Workflow:
2. Your `Entrance` Menu Class defines what should be shown to the Alfred user when they start the Workflow: . `Entrance` is a convention for the first Menu of your Workflow (although you can name it whatever you want, but then you need to override the `currentMenu` method. See [Alfred Time](#case-3-alfred-time) below). All other Menus can be called whatever you want, as they will be defined as `args` of your Menu Items.
3. The script called by Alfred only checks whether you're showing a Menu or calling an Action:

That's it. Just pass the right [`args` and `variables`](#args-and-variables) according to the conventions and it just works.

Check the Alfred Ploi Workflow for the Workflow Skeleton:

### Case 2: Alfred Kat

[](#case-2-alfred-kat)

This Workflow overrides only the `do` and `notify` methods.

1. The `do` method needs a specific argument, so it is overriden:
2. The `notify` method needs to send different notifications, so it is overriden too:
3. The Menus (only one in this case) are not overriden:

All the rest of the wiring is handled by this package, and the Alfred Workflow Skeleton:

### Case 3: Alfred Time

[](#case-3-alfred-time)

This is the hardest one. It overrides:

1. The `do` method, passing an argument, sometimes:
2. The `notify` method, for custom messages:
3. The way Menus are loaded, because in this Workflow, Menus are arranged in specific (Timer Services) folders:

And yet, even in this case, most of the code is just specific code for this particular Workflow. Most of the Alfred wiring is handled by this package, and the Workflow Skeleton:

### Args and Variables

[](#args-and-variables)

So, a Workflow does two things:

1. show a Menu
2. do an Action

How do you tell Alfred which Menu to show or which Action to run? Through the `args` and `variables`.

For example, in your `Entrance` Menu Class, you show a menu:

```
class Entrance extends BaseMenu
{
    public static function scriptFilter()
    {
        ScriptFilter::add(
            Item::create()
                ->title('Choose your Project')
                ->arg('choose_project')
        );

        // ...
    }
```

Alfred will then call your `src/Menus/ChooseProject.class` Class and its `scriptFilter` method, where you design what appears in your next Menu.

Any `arg` that is different than `do` is taken as a Menu, loaded from the `src/Menus` folder (with the default convention, as see with [Alfred-Time](#case-3-alfred-time), you can override how/where the Menus are loaded).

To do an Action:

```
class SelectFile extends BaseMenu
{
    public static function scriptFilter()
    {
        ScriptFilter::add(
            Item::create()
                ->title('Delete File')
                ->arg('do')
                ->variable('action', 'deleteFile'),
            Item::create()
                ->title('Copy File')
                ->arg('do')
                ->variable('action', 'copyFile');
        );

        // ...
    }
}
```

For the first item, Alfred will call your `Workflow` Class and its `deleteFile` method. For the second item, the `copyFile` method.

For a simple example, see the [Alfred Ploi Workflow source](https://github.com/godbout/alfred-ploi/tree/master/src) again.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 94.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~167 days

Total

5

Last Release

1467d ago

PHP version history (4 changes)1.0.0PHP ^7.2

1.1.0PHP ^7.4 || ^8.0

1.2.0PHP ^7.3 || ^8.0

1.3.0PHP ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a99985b9d95710208c2b66a8935acaf3ef0e09d98d8732408a683a26c09351d?d=identicon)[godbout](/maintainers/godbout)

---

Top Contributors

[![godbout](https://avatars.githubusercontent.com/u/121373?v=4)](https://github.com/godbout "godbout (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

alfredalfred-workflowphptemplateworkflowphptemplateworkflowalfredalfred-workflow

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/godbout-alfred-workflow-workflow/health.svg)

```
[![Health](https://phpackages.com/badges/godbout-alfred-workflow-workflow/health.svg)](https://phpackages.com/packages/godbout-alfred-workflow-workflow)
```

###  Alternatives

[alhimik1986/php-excel-templator

PHP Spreadsheet extension for generating excel files from template

350336.7k1](/packages/alhimik1986-php-excel-templator)[godbout/alfred-workflow-scriptfilter

Generate Alfred 3 or 4 Workflow Results in PHP with a laugh.

173.7k1](/packages/godbout-alfred-workflow-scriptfilter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
