Skip to content

OmniFocus

OmniFocus is a professional task management app. Protocol Launcher allows you to generate deep links for OmniFocus.

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 OmniFocus

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

const url = open()

Add Action

Create a new action, optionally assigning project, tag/context, due date, flag, and x-callback-url parameters.

On-Demand
ts
import { add } from 'protocol-launcher/omnifocus'

const url = add({
  name: 'Pick up milk',
  note: 'You gotta',
})

const url = add({
  name: 'Email team',
  context: 'Mac',
  due: 'jun 25 8am',
  estimate: '30m',
  flag: true,
  project: 'Launch',
  revealNewItem: true,
})

const url = add({
  name: 'My shiny new task',
  autosave: true,
  xSuccess: 'omnifocus:///',
})

Paste TaskPaper

Paste TaskPaper content into the Inbox, Projects, or another OmniFocus target.

On-Demand
ts
import { paste } from 'protocol-launcher/omnifocus'

const url = paste({
  content: '- Pick up milk',
  target: 'inbox',
})

const url = paste({
  content: 'Launch:\n\t- Draft announcement',
  target: 'projects',
  index: 0,
})

Open Built-In Perspectives

On-Demand
ts
import { openInbox, openForecast, openToday } from 'protocol-launcher/omnifocus'

const inboxUrl = openInbox()
const forecastUrl = openForecast()
const todayUrl = openToday()

Open Custom Perspective

On-Demand
ts
import { openPerspective } from 'protocol-launcher/omnifocus'

const url = openPerspective({
  name: 'Due Soon',
})

Open Task

On-Demand
ts
import { openTask } from 'protocol-launcher/omnifocus'

const url = openTask({
  id: 'mbp0SlWkvqq',
})

Official Documentation