Skip to content

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

On-Demand
ts
import { open } from 'protocol-launcher/alfred'

const url = open()

Open Preferences

On-Demand
ts
import { openPreferences } from 'protocol-launcher/alfred'

const url = openPreferences()
On-Demand
ts
import { navigateTo } from 'protocol-launcher/alfred'

const url = navigateTo({
  path: 'workflows',
})
On-Demand
ts
import { navigateTo } from 'protocol-launcher/alfred'

const url = navigateTo({
  path: 'workflows>resolvedependencies',
})
On-Demand
ts
import { navigateTo } from 'protocol-launcher/alfred'

const url = navigateTo({
  path: 'workflows>workflow>user.workflow.81CBDAC6-527B-4B33-BA4E-F12563EBED09',
})
On-Demand
ts
import { navigateTo } from 'protocol-launcher/alfred'

const url = navigateTo({
  path: 'features>snippets',
})
On-Demand
ts
import { gallery } from 'protocol-launcher/alfred'

const url = gallery({
  author: 'alanhe',
  workflow: 'about-mac',
})
On-Demand
ts
import { gallery } from 'protocol-launcher/alfred'

const url = gallery({
  author: 'alfredapp',
  workflow: '1password',
})
On-Demand
ts
import { customSearch } from 'protocol-launcher/alfred'

const url = customSearch({
  title: 'Search Github for '{query}'',
  keyword: 'gh',
  url: 'https://github.com/search?q={query}',
})