Crates.io | agent-notifications |
lib.rs | agent-notifications |
version | 0.4.8 |
created_at | 2025-09-09 10:34:19.219086+00 |
updated_at | 2025-09-23 16:55:24.256026+00 |
description | A CLI tool for managing agent notifications |
homepage | |
repository | |
max_upload_size | |
id | 1830488 |
size | 264,428 |
Desktop notifications for your coding agents.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Desktop notifications for your coding agents.
Note: This is early-stage software. Expect rough edges.
notify-rust
)cargo install agent-notifications
cargo install --path .
Run the initializer and follow prompts:
anot init claude
~/.claude/settings.json
, .claude/settings.json
, or .claude/settings.local.json
.You’re done. Claude Code will invoke anot claude
for the selected events to show notifications.
It edits your chosen Claude Code settings file and adds hook entries that execute the anot claude
command on selected events. Re-running the initializer updates/removes prior anot
hooks and applies your latest selection.
Run the initializer and follow prompts:
anot init codex
$CODEX_HOME/config.toml
, ~/.codex/config.toml
, or provide a custom path.notify
command already exists, choose whether to override, keep, or remove it.You’re done. Codex will invoke anot codex
to show notifications when events fire.
It sets the notify
command in Codex’s config.toml
to point to this tool, e.g.:
notify = ["/absolute/path/to/anot", "codex"]
If you prefer to edit your settings file directly, add entries like this:
{
"hooks": {
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "/absolute/path/to/anot claude",
"timeout": 10
}
]
}
],
"PreToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/absolute/path/to/anot claude",
"timeout": 10
}
]
}
]
}
}
Notes:
Notification
, UserPromptSubmit
, Stop
, SubagentStop
, PreCompact
, SessionStart
, SessionEnd
don’t require a matcher
.PreToolUse
and PostToolUse
support matcher
(exact, regex, *
, or empty string).In Codex’s config.toml
, set notify
to execute this tool:
notify = ["/absolute/path/to/anot", "codex"]
anot
global options:
--config <FILE>
, -c <FILE>
: Path to a-notifications.json
(default is under your system config dir, e.g., ~/.config/agent_notifications/a-notifications.json
).--reset-config
, -r
: Recreate default config file if it exists.--debug
, -d
: Increase debug level (repeatable).Commands:
anot init claude [<path-to-settings.json>]
: Interactive setup for Claude Code hooks. If no path is provided, you’ll be prompted to choose.anot claude
: Processes a Claude Code hook event from stdin and emits JSON hook output. Used by the hooks you configure.anot init codex
: Interactive setup for Codex notify
in config.toml
. If no path is provided, you’ll be prompted to choose.anot codex [<notification-json>]
: Processes a Codex notification payload. Used by the hooks you configure.View help: anot --help
, anot init --help
You can simulate a Claude Code hook by piping JSON into anot claude
:
echo '{
"session_id": "abc123",
"transcript_path": "/path/to/transcript.jsonl",
"hook_event_name": "Notification",
"message": "Hello from anot"
}' | anot claude
Expected:
You can also simulate a Codex notification:
echo '{
"type": "agent-turn-complete",
"turn-id": "abc123",
"input-messages": ["Run tests"],
"last-assistant-message": "All tests passed"
}' | anot codex
anot
keeps its own config at:
~/.config/agent_notifications/a-notifications.json
(created on first run)--config <FILE>
--reset-config
{
"version": 1,
"claude": { "pretend": true, "sound": true },
"codex": { "pretend": false, "sound": true }
}
version
: Internal schema version. Leave as 1
.claude.pretend
(macOS only): When true
, anot
pretends to be the Claude app for notifications so the left-side app icon shows as Claude. When false
, the notification uses the Terminal app identity and shows the Claude icon as the content image on the right.claude.sound
(macOS only): When true
, anot
plays a notification sound for Claude notifications.codex.pretend
(macOS only): When true
, anot
attempts to pretend to be the ChatGPT app for notifications. The ChatGPT app appears to enforce stricter checks, so pretending is unreliable. It’s recommended to keep this false
so the Codex/ChatGPT icon is shown as the content image instead.codex.sound
(macOS only): When true
, anot
plays a notification sound for Codex notifications.Defaults are claude.pretend = true
, codex.pretend = false
.
anot init claude
and deselect all events to remove existing anot
hooks from the chosen settings file.For Codex, run anot init codex
and choose “Remove the notify configuration” to clear the notify
entry, or edit your config.toml
and remove the notify
line.
Icon behavior differs by platform:
anot init claude
and confirm hooks are added to the expected settings file.anot
.GPL-3.0-or-later. See LICENSE
.