Skip to content

iA Writer

iA Writer is a focused writing app for macOS, iPadOS, and iOS. Protocol Launcher allows you to generate iA Writer URL Commands with the ia-writer:// scheme and x-callback-url support.

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 Document

Opens Editor with an existing document if found, or a new empty document.

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

const url = open({
  path: '/Drafts/Notes.txt',
})

New File

Opens Editor with a new document.

On-Demand
ts
import { newFile } from 'protocol-launcher/ia-writer'

const url = newFile({
  path: '/Drafts/Meeting Notes.txt',
  text: '# Meeting Notes\n\n',
  author: 'AI',
})

Opens Quick Search with a given query.

On-Demand
ts
import { quickSearch } from 'protocol-launcher/ia-writer'

const url = quickSearch({
  query: 'meeting notes',
})

Read File

Reads and returns file contents. iA Writer requires an auth-token for data commands and returns path and text parameters on x-success.

On-Demand
ts
import { read } from 'protocol-launcher/ia-writer'

const url = read({
  authToken: 'REPLACE_WITH_YOUR_TOKEN',
  path: '/Drafts/Notes.txt',
  xSuccess: 'myapp://callback',
})

Write File

Creates or modifies an existing file and returns file contents. iA Writer requires an auth-token for data commands and returns path and text parameters on x-success.

On-Demand
ts
import { write } from 'protocol-launcher/ia-writer'

const url = write({
  authToken: 'REPLACE_WITH_YOUR_TOKEN',
  path: '/Drafts/Notes.txt',
  text: 'Hello world',
  mode: 'add',
  addLocation: 'end',
  addPadding: 'paragraph',
  author: 'AI',
  xSuccess: 'myapp://callback',
})

Version

Returns iA Writer app version and URL scheme version. iA Writer returns scheme-version and app-version parameters on x-success.

On-Demand
ts
import { version } from 'protocol-launcher/ia-writer'

const url = version({
  xSuccess: 'myapp://callback',
})

Official Documentation