Alfred
Alfred is an award-winning productivity app for macOS. It boosts your efficiency with hotkeys, keywords, text expansion and more. Search your Mac and the web, and be more productive with custom actions to control your Mac. Protocol Launcher allows you to generate deep links to open Alfred, navigate preferences, browse workflows in the gallery, and create custom searches.
Usage
There are two ways to use this library:
- On-Demand import from subpaths enables tree-shaking and keeps bundles small.
- Full Import from the root package is convenient but includes all app modules.
Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.
Select Installation Method
On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.
Open Alfred
ts
import { open } from 'protocol-launcher/alfred'
const url = open()Open Preferences
ts
import { openPreferences } from 'protocol-launcher/alfred'
const url = openPreferences()Navigate to Preferences Section
ts
import { navigateTo } from 'protocol-launcher/alfred'
const url = navigateTo({
path: 'workflows',
})Navigate to Resolve Dependencies
ts
import { navigateTo } from 'protocol-launcher/alfred'
const url = navigateTo({
path: 'workflows>resolvedependencies',
})Navigate to Specific Workflow
ts
import { navigateTo } from 'protocol-launcher/alfred'
const url = navigateTo({
path: 'workflows>workflow>user.workflow.81CBDAC6-527B-4B33-BA4E-F12563EBED09',
})Navigate to Snippets
ts
import { navigateTo } from 'protocol-launcher/alfred'
const url = navigateTo({
path: 'features>snippets',
})Open Gallery Workflow
ts
import { gallery } from 'protocol-launcher/alfred'
const url = gallery({
author: 'alanhe',
workflow: 'about-mac',
})Open 1Password Gallery Workflow
ts
import { gallery } from 'protocol-launcher/alfred'
const url = gallery({
author: 'alfredapp',
workflow: '1password',
})Create Custom Search
ts
import { customSearch } from 'protocol-launcher/alfred'
const url = customSearch({
title: 'Search Github for '{query}'',
keyword: 'gh',
url: 'https://github.com/search?q={query}',
})