Skip to content

heydong1/codex-notify

Repository files navigation

codex-notify

中文文档

macOS desktop notification helper for Codex CLI's notify hook. It pops a native notification, plays a sound, and appends the received payload to payload-log.jsonl so you can inspect events later.

Features

  • Parses the JSON passed in via argv[2], using the type field to build the notification title/body
  • Leverages osascript to raise a system notification and plays /System/Library/Sounds/Glass.aiff
  • Appends every payload to payload-log.jsonl (JSON Lines) for debugging

Prerequisites

  • macOS (requires osascript and the system sound path)
  • Node.js ≥ 24 (relies on the built-in TypeScript execution support)
  • pnpm (recommended for consistent installs using the provided lockfile)

Installation

git clone https://github.com/heydong1/codex-notify.git ~/codex-notify
cd ~/codex-notify
pnpm install

Configure in Codex CLI

  1. Decide the script path, e.g. ~/codex-notify/notify.ts or /Users/<your-username>/codex-notify/notify.ts
  2. Update the Codex config:
    notify = ["node", "/Users/<your-username>/codex-notify/notify.ts"]
  3. Restart Codex; every event will now trigger a notification, sound, and payload logging

Logs

Payloads are appended to payload-log.jsonl in the repo root for auditing.

License

MIT License — see LICENSE for details.

About

macOS desktop notification helper for Codex CLI's notify hook

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages