Installation

Alfred-Workflow can be installed from the Python Package Index with pip or from the source code on GitHub.

pip / PyPi

You can install Alfred-Workflow directly into your workflow with:

pip install --target=/path/to/my/workflow Alfred-Workflow

Important

If you intend to distribute your workflow to other users, you should include Alfred-Workflow (and other non-standard Python libraries your workflow requires) within your workflow as described above. Do not ask users to install anything into their system Python. That way lies broken software.

GitHub

Download the alfred-workflow-X.X.X.zip file from the GitHub releases page and either extract the ZIP to the root directory of your workflow (where info.plist is) or place the ZIP in the root directory and add sys.path.insert(0, 'alfred-workflow-X.X.X.zip') to the top of your Python scripts.

Important

background and update will not work if you are importing Alfred-Workflow from a zip file.

If you need to use background or the self-updating functionality, you must extract the zip archive.

Alternatively, you can download the source code from the GitHub repository and copy the workflow subfolder to the root directory of your workflow.

Your Workflow directory should look something like this (where yourscript.py contains your workflow code and info.plist is the workflow information file generated by Alfred):

Your Workflow/
    info.plist
    icon.png
    workflow/
        __init__.py
        background.py
        notify.py
        Notify.tgz
        update.py
        version
        web.py
        workflow.py
    yourscript.py
    etc.

Or like this:

Your Workflow/
    info.plist
    icon.png
    workflow-1.X.X.zip
    yourscript.py
    etc.