Skip to content

Raycast

Raycast is a launcher and productivity app for opening tools, running commands, managing windows, and extending macOS workflows from one command bar. Protocol Launcher generates Raycast deeplinks documented by the official Raycast developer and manual pages.

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.

Extension Command

Generate a Raycast extension command deeplink. Raycast requires the owner or author, extension name, and command name from the extension manifest. Built-in extensions use raycast as the owner and slugified extension and command names.

On-Demand
ts
import { extensionCommand } from 'protocol-launcher/raycast'

const url = extensionCommand({
  authorOrOwner: 'linear',
  extensionName: 'linear',
  commandName: 'create-issue-for-myself',
  arguments: {
    title: 'Triage new issues',
  },
})

const withOptionsUrl = extensionCommand({
  authorOrOwner: 'raycast',
  extensionName: 'calendar',
  commandName: 'my-schedule',
  launchType: 'background',
  context: {
    source: 'protocol-launcher',
  },
  fallbackText: 'My Schedule',
})

Custom Window Management Command

Generate a Raycast custom window management command deeplink. A matching name opens an existing custom single-window command; omitting name creates a temporary command from the provided window arguments.

For Window Layout deeplinks, Raycast only supports the name argument.

On-Demand
ts
import { customWindowManagementCommand } from 'protocol-launcher/raycast'

const url = customWindowManagementCommand({
  name: 'MyCommand',
  position: 'center',
  absoluteWidth: 500.0,
  relativeHeight: 0.5,
  absoluteXOffset: 0.0,
  absoluteYOffset: 0.0,
})

const temporaryUrl = customWindowManagementCommand({
  position: 'top-left',
  relativeWidth: 0.5,
  relativeHeight: 0.5,
  relativeXOffset: 0.1,
  relativeYOffset: 0.2,
})

Official Documentation