crabcode

Notifications

Configure event sounds, desktop notifications, and terminal alert signals.

Configure alerts

Notifications are crabcode-specific and apply only to crabcode config files. Each event can control terminal alert signals, audio, and native desktop notifications from one place.

{
  "notifications": {
    "terminalCondition": "unfocused",
    "complete": {
      "terminal": "auto",
      "soundEnabled": true,
      "soundFile": "",
      "desktop": true,
    },
    "error": {
      "soundEnabled": true,
      "soundFile": "",
      "desktop": false,
    },
    "permission": {
      "terminal": "auto",
      "soundEnabled": false,
      "soundFile": "/absolute/path/to/permission.wav",
      "desktop": false,
    },
    "question": {
      "terminal": "auto",
      "soundEnabled": false,
      "soundFile": "/absolute/path/to/question.wav",
      "desktop": false,
    },
  },
}

Events are complete, error, permission, and question.

FieldBehavior
terminalEmits a terminal BEL (\x07) for editor or orchestrator alerts.
soundEnabledPlays audio for the event.
soundFileOptional absolute path to a custom audio file. Use "", null, or omit it to use defaults.
desktopSends a native desktop notification.

complete and error default to soundEnabled: true and use bundled sounds when soundFile is unset. permission and question default to silent unless you enable them and provide a file.

Terminal Notifications

The terminal property is useful for agent orchestrator apps (i.e. Zed, Superconductor, T3 Code) that listen to terminal notifications. In Zed, BEL marks the terminal as notified, which lets Zed render the accent dot on the terminal tab or terminal thread entry.

ValueBehavior
"auto"Emit BEL only in supported terminals. Currently this targets Zed via ZED_TERM=true or TERM_PROGRAM=zed.
"enabled" / trueEmit BEL in any terminal.
"disabled" / falseDo not emit terminal notifications for that event.

notifications.terminalCondition controls when terminal signals are emitted.

ValueBehavior
"unfocused"Emit only after the terminal reports focus loss. This is the default.
"always"Emit even while the terminal is focused.

Other terminals may play an audible bell, so use "enabled" only when you want that behavior outside supported terminals.

Desktop Notifications

The desktop property sends native desktop notifications for an event. Desktop notifications are best-effort and must be enabled per event with desktop: true.

macOS

On macOS, crabcode uses a small local Crabcode Notifier.app helper so Notification Center can show the crabcode icon on the left side of the notification. The helper is generated locally under crabcode's state/cache directory and is ad-hoc signed; it is not published to the App Store and does not require an Apple Developer account.

The first time crabcode sends a desktop notification, macOS may show a permission prompt. Choose Allow, or enable it later in System Settings → Notifications → Crabcode. If notifications are disabled there, macOS suppresses crabcode desktop notifications.

Crabcode enabled in macOS Notification settings

Use notifications.macosBackend to choose the macOS desktop notification backend:

ValueBehavior
"crabcode"Use the local Crabcode Notifier helper. This is the default and shows the crabcode icon.
"osascript"Use the older osascript backend. This uses the standard macOS script notification identity, so it will not show the crabcode icon.
{
  "notifications": {
    "macosBackend": "osascript",
    "complete": {
      "desktop": true,
    },
  },
}

Linux

On Linux, crabcode uses the available desktop notification backend, such as notify-send, when present.

Windows

On Windows, crabcode uses PowerShell toast notifications when PowerShell is available.