Observed since 20 Oct, 22:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Cross-platform notifications for long-running agentic CLI tools
agent-notify sends notifications when long-running CLI/agent tasks finish.
It supports two usage styles:
agent-notify run -- ...)Recommended:
pipx install agent-notify
Alternative:
pip install agent-notify
From source:
python -m pip install -e .
Confirm install:
agent-notify --help
agent-notify test-notify --channel console
Run any long command through the wrapper:
agent-notify run -- python3 -c "import time; time.sleep(8)"
If the command fails, the notification title changes to Failed.
This notifies when an agent turn/task completes inside Codex/Claude/Gemini flows. You do not need to exit the CLI session.
shell-init)This notifies when shell commands end. For interactive agents, that usually means on CLI exit. Use this only if you want process-exit behavior.
Codex provides a notify hook. Use the included bridge:
chmod +x examples/codex_notify_bridge.sh
BRIDGE_PATH="$(realpath examples/codex_notify_bridge.sh)"
echo "$BRIDGE_PATH"
Add to ~/.codex/config.toml:
notify = [
"/absolute/path/to/examples/codex_notify_bridge.sh"
]
Optional debug logs:
export AGENT_NOTIFY_DEBUG=1
Log location:
~/.agentnotify/logs/codex_notify.log
Configure hooks in .claude/settings.local.json (or user settings):
{
"hooks": {
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notify claude-hook --event Stop --name claude-code --channel both --quiet-when-focused --chime ping"
}
]
}
],
"SubagentStop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notify claude-hook --event SubagentStop --name claude-code --channel both --quiet-when-focused --chime ping"
}
]
}
]
}
}
Configure AfterAgent hook:
{
"hooksConfig": {
"enabled": true
},
"hooks": {
"AfterAgent": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "agent-notify gemini-hook --name gemini --channel both --quiet-when-focused --chime ping",
"timeout": 10000
}
]
}
]
}
}
ollama run currently has no native per-turn completion hook.ollama launch codex or ollama launch claude, configure Codex/Claude hooks above.--format json), pipe into agent-notify ollama-hook.Example:
ollama run llama3 --format json | agent-notify ollama-hook --name ollama --channel both
agent-notify run -- <cmd...>
agent-notify watch --pid <pid>
agent-notify test-notify
agent-notify tail --file <path> --pattern <text>
agent-notify shell-init
Hook bridge commands used by integrations:
agent-notify gemini-hookagent-notify claude-hookagent-notify codex-hookagent-notify ollama-hookSuppress notifications while terminal is focused (macOS):
agent-notify gemini-hook --quiet-when-focused
Add sound:
agent-notify claude-hook --chime ping
Force console output:
agent-notify run --channel console -- your-command
Environment variables:
AGENT_NOTIFY_TITLE_PREFIX="Agent"AGENT_NOTIFY_CHANNELS="desktop,console"AGENT_NOTIFY_TAIL_LINES=20AGENT_NOTIFY_POLL_INTERVAL=1.0Optional TOML config at ~/.agentnotify/config.toml:
title_prefix = "Agent"
channels = ["desktop"]
tail_lines = 20
poll_interval = 1.0
Environment variables override file values.
You are likely using shell-init mode. That is process-exit based.
Use task-level hooks (codex-hook, claude-hook, gemini-hook) instead and remove shell-init lines from your shell startup file.
agent-notify test-notify --channel consoleosascriptwin10toast fallback)notify is configured in ~/.codex/config.toml.chmod +x examples/codex_notify_bridge.sh.AGENT_NOTIFY_DEBUG=1 and inspect ~/.agentnotify/logs/codex_notify.log.macOS:
osascript).Windows:
pip install "agent-notify[windows]".Development checks:
python -m pip install -e ".[dev]"
ruff check .
pytest -q
python -m build
twine check dist/*
Release checklist:
docs/release_checklist.mdProject/process docs:
docs/project_charter.mddocs/scrum_working_agreement.mddocs/assumptions.mddocs/commit_plan.mdSECURITY.mdMIT (LICENSE)
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1Yanked | 20 Feb 2026 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:45 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:23c6d7182915093e5e49c647cab232506de03b049f2d629f2f54ebab34f1cdbc