/init
Initialize notification resources and create missing shared configuration
> /plugin marketplace add 777genius/agent-notifications > /plugin install claude-notifications-go@claude-notifications-go
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/init
Context preview
What this command does when you run it.
Initialize notification resources and create missing shared configuration
Command definition
init.mddescription: Initialize notification resources and create missing shared configuration
disable-model-invocation: true
allowed-tools: Bash, AskUserQuestion
Initialize Agent Notifications
Use the recorded adapter installation and existing resource discovery to locate the platform executable and installer. `PLUGIN_ROOT`, `CLAUDE_PLUGIN_ROOT` and `INSTALL_TARGET_DIR` locate resources only; never derive notification config from them. Binary and plugin names remain unchanged.
Before running any installer/update, use the verified config-capable helper's read-only preflight from the supported top-level setup flow. It must inspect recorded active bundle/custom-root candidates before any cache update, uninstall or refresh. Never guess the newest cache or automatically copy its config. If the helper/preflight is unavailable, stop and retain the working runtime; do not download/run a legacy installer as a fallback. These instructions require the coordinated config-capable runtime/installer; no downloadable bridge release is promised.
For personalized/unknown cache-only settings, stop before the updater. Explain source and selected destination paths without showing contents. Stop old writers and obtain an explicit choice of recovery source. With `NOTIFICATIONS_BIN` set to the verified new helper and `RECOVERY_SOURCE` to the chosen file:
"$NOTIFICATIONS_BIN" config path --json
"$NOTIFICATIONS_BIN" config inspect --json
# Only after explicit recovery approval and a confirmed missing destination:
"$NOTIFICATIONS_BIN" config init --from "$RECOVERY_SOURCE"
`--from FILE` validates and imports raw settings into a missing selected destination only. It cannot overwrite valid/invalid existing config, migrate L to N, or reset settings. Resolve invalid existing files explicitly with stopped writers and private recovery copies. Never use bundle copies or links for compatibility. Retry preflight after successful recovery before updating.
After successful resource installation and registration through the supported top-level flow, initialize shared configuration once (a repeated call is safe):
"$NOTIFICATIONS_BIN" config init
"$NOTIFICATIONS_BIN" config inspect --json
Existing valid config is a byte/mode/mtime-preserving no-op. Existing invalid config is an error. Missing automatic config is created at N; existing L remains selected; explicit E selects only that file. See [OS paths and environment rules](../docs/CONFIGURATION.md#manual-configuration). Hooks never initialize config.
If assets/registration succeeded but init failed, report partial success and the safe error/path. Retry only `config init` after resolving the cause; do not repeat downloads or registration. Do not claim success after a failed command. Do not add config writes to low-level asset installers.
Then run `/claude-notifications-go:settings` for [private revision-checked edits](settings.md). Save diagnostics privately; never print raw configuration or expanded secrets.
After a successful plugin install, agent-notify setup runs by default. When the installed CLI supports portable `setup-notifications wizard`, that is the setup path (`--hooks false --agent-notify true`). The wizard downloads the verified portable ZIP for the installed binary's release; Linux first configures the supported `navigation=none` policy. Pass `--skip-agent-notify` to keep hooks-only setup. If the advertised setup command runs and fails, this slash command returns incomplete/nonzero with a retry; committed plugin/hooks files stay in place. A missing binary, a CLI without the wizard, or a released CLI older than this portable setup path skips MCP setup with a warning. An explicit `--agent-notify` reports incomplete.
SKIP_AGENT_NOTIFY=false
SEEN_AGENT_NOTIFY=false
CONFIGURE_ARGS=()
quote_shell_command() {
local quoted="" arg
for arg in "$@"; do
quoted="${quoted:+$quoted }$(printf '%q' "$arg")"
done
printf '%s' "$quoted"
}
while [ "$#" -gt 0 ]; do
case "$1" in
--skip-agent-notify) SKIP_AGENT_NOTIFY=true; shift ;;
--agent-notify) SEEN_AGENT_NOTIFY=true; shift ;;
--navigation|--app|--team-id|--allow-unknown-caller|--allow-caller-asserted)
[ "$#" -ge 2 ] || { echo "Missing value for $1" >&2; exit 1; }
case "$1" in
--navigation) [ "$2" = none ] || { echo "Invalid navigation: $2" >&2; exit 1; } ;;
--app)
case "$2" in /*) ;; *) echo "App path must be absolute." >&2; exit 1 ;; esac
case "$2" in *..*) echo "App path must be a physical path." >&2; exit 1 ;; esac ;;
esac
CONFIGURE_ARGS+=("$1" "$2"); shift 2 ;;
--request-permission|--json) CONFIGURE_ARGS+=("$1"); shift ;;
*) echo "unknown option: $1" >&2; exit 1 ;;
esac
done
if [ "$SEEN_AGENT_NOTIFY" = true ] && [ "$SKIP_AGENT_NOTIFY" = true ]; then
echo "--agent-notify and --skip-agent-notify are mutually exclusive." >&2
exit 1
fi
if [ "$SKIP_AGENT_NOTIFY" = true ] && [ "${#CONFIGURE_ARGS[@]}" -ne 0 ]; then
echo "Route flags require --agent-notify." >&2
exit 1
fi
if [ "$SKIP_AGENT_NOTIFY" != true ]; then
nav="" app="" team="" unknown="" asserted=""
i=0
while [ "$i" -lt "${#CONFIGURE_ARGS[@]}" ]; do
case "${CONFIGURE_ARGS[$i]}" in
--navigation|--app|--team-id|--allow-unknown-caller|--allow-caller-asserted)
i=$((i + 1))
[ "$i" -lt "${#CONFIGURE_ARGS[@]}" ] || { echo "Missing value for ${CONFIGURE_ARGS[$((i - 1))]}" >&2; exit 1; }
case "${CONFIGURE_ARGS[$((i - 1))]}" in
--navigation) nav="${CONFIGURE_ARGS[$i]}" ;;
--app) app="${CONFIGURE_ARGS[$i]}" ;;
--team-id) team="${CONFIGURE_ARGS[$i]}" ;;
--allow-unknown-caller) unknown="${CONFIGURE_ARGS[$i]}" ;;
--allow-caller-asserted) asserted="${CONFIGURE_ARGS[$i]}" ;;
esac ;;
--json|--request-permission) ;;
*) echo "unknown option: ${CONFIGURE_ARGS[$i]}" >&2; exit 1 ;;
esac
i=$((i + 1))
done
if [ -z "$nav" ] && [ -z "Read more
description: Initialize notification resources and create missing shared configuration disable-model-invocation: true allowed-tools: Bash, AskUserQuestion
Initialize Agent Notifications
Use the recorded adapter installation and existing resource discovery to locate the platform executable and installer. `PLUGIN_ROOT`, `CLAUDE_PLUGIN_ROOT` and `INSTALL_TARGET_DIR` locate resources only; never derive notification config from them. Binary and plugin names remain unchanged.
Before running any installer/update, use the verified config-capable helper's read-only preflight from the supported top-level setup flow. It must inspect recorded active bundle/custom-root candidates before any cache update, uninstall or refresh. Never guess the newest cache or automatically copy its config. If the helper/preflight is unavailable, stop and retain the working runtime; do not download/run a legacy installer as a fallback. These instructions require the coordinated config-capable runtime/installer; no downloadable bridge release is promised.
For personalized/unknown cache-only settings, stop before the updater. Explain source and selected destination paths without showing contents. Stop old writers and obtain an explicit choice of recovery source. With `NOTIFICATIONS_BIN` set to the verified new helper and `RECOVERY_SOURCE` to the chosen file:
"$NOTIFICATIONS_BIN" config path --json "$NOTIFICATIONS_BIN" config inspect --json # Only after explicit recovery approval and a confirmed missing destination: "$NOTIFICATIONS_BIN" config init --from "$RECOVERY_SOURCE"
`--from FILE` validates and imports raw settings into a missing selected destination only. It cannot overwrite valid/invalid existing config, migrate L to N, or reset settings. Resolve invalid existing files explicitly with stopped writers and private recovery copies. Never use bundle copies or links for compatibility. Retry preflight after successful recovery before updating.
After successful resource installation and registration through the supported top-level flow, initialize shared configuration once (a repeated call is safe):
"$NOTIFICATIONS_BIN" config init "$NOTIFICATIONS_BIN" config inspect --json
Existing valid config is a byte/mode/mtime-preserving no-op. Existing invalid config is an error. Missing automatic config is created at N; existing L remains selected; explicit E selects only that file. See [OS paths and environment rules](../docs/CONFIGURATION.md#manual-configuration). Hooks never initialize config.
If assets/registration succeeded but init failed, report partial success and the safe error/path. Retry only `config init` after resolving the cause; do not repeat downloads or registration. Do not claim success after a failed command. Do not add config writes to low-level asset installers.
Then run `/claude-notifications-go:settings` for [private revision-checked edits](settings.md). Save diagnostics privately; never print raw configuration or expanded secrets.
After a successful plugin install, agent-notify setup runs by default. When the installed CLI supports portable `setup-notifications wizard`, that is the setup path (`--hooks false --agent-notify true`). The wizard downloads the verified portable ZIP for the installed binary's release; Linux first configures the supported `navigation=none` policy. Pass `--skip-agent-notify` to keep hooks-only setup. If the advertised setup command runs and fails, this slash command returns incomplete/nonzero with a retry; committed plugin/hooks files stay in place. A missing binary, a CLI without the wizard, or a released CLI older than this portable setup path skips MCP setup with a warning. An explicit `--agent-notify` reports incomplete.
SKIP_AGENT_NOTIFY=false
SEEN_AGENT_NOTIFY=false
CONFIGURE_ARGS=()
quote_shell_command() {
local quoted="" arg
for arg in "$@"; do
quoted="${quoted:+$quoted }$(printf '%q' "$arg")"
done
printf '%s' "$quoted"
}
while [ "$#" -gt 0 ]; do
case "$1" in
--skip-agent-notify) SKIP_AGENT_NOTIFY=true; shift ;;
--agent-notify) SEEN_AGENT_NOTIFY=true; shift ;;
--navigation|--app|--team-id|--allow-unknown-caller|--allow-caller-asserted)
[ "$#" -ge 2 ] || { echo "Missing value for $1" >&2; exit 1; }
case "$1" in
--navigation) [ "$2" = none ] || { echo "Invalid navigation: $2" >&2; exit 1; } ;;
--app)
case "$2" in /*) ;; *) echo "App path must be absolute." >&2; exit 1 ;; esac
case "$2" in *..*) echo "App path must be a physical path." >&2; exit 1 ;; esac ;;
esac
CONFIGURE_ARGS+=("$1" "$2"); shift 2 ;;
--request-permission|--json) CONFIGURE_ARGS+=("$1"); shift ;;
*) echo "unknown option: $1" >&2; exit 1 ;;
esac
done
if [ "$SEEN_AGENT_NOTIFY" = true ] && [ "$SKIP_AGENT_NOTIFY" = true ]; then
echo "--agent-notify and --skip-agent-notify are mutually exclusive." >&2
exit 1
fi
if [ "$SKIP_AGENT_NOTIFY" = true ] && [ "${#CONFIGURE_ARGS[@]}" -ne 0 ]; then
echo "Route flags require --agent-notify." >&2
exit 1
fi
if [ "$SKIP_AGENT_NOTIFY" != true ]; then
nav="" app="" team="" unknown="" asserted=""
i=0
while [ "$i" -lt "${#CONFIGURE_ARGS[@]}" ]; do
case "${CONFIGURE_ARGS[$i]}" in
--navigation|--app|--team-id|--allow-unknown-caller|--allow-caller-asserted)
i=$((i + 1))
[ "$i" -lt "${#CONFIGURE_ARGS[@]}" ] || { echo "Missing value for ${CONFIGURE_ARGS[$((i - 1))]}" >&2; exit 1; }
case "${CONFIGURE_ARGS[$((i - 1))]}" in
--navigation) nav="${CONFIGURE_ARGS[$i]}" ;;
--app) app="${CONFIGURE_ARGS[$i]}" ;;
--team-id) team="${CONFIGURE_ARGS[$i]}" ;;
--allow-unknown-caller) unknown="${CONFIGURE_ARGS[$i]}" ;;
--allow-caller-asserted) asserted="${CONFIGURE_ARGS[$i]}" ;;
esac ;;
--json|--request-permission) ;;
*) echo "unknown option: ${CONFIGURE_ARGS[$i]}" >&2; exit 1 ;;
esac
i=$((i + 1))
done
if [ -z "$nav" ] && [ -z "🔔 Cross-platform smart notifications for Claude/Codex/OpenCode/Cursor/Gemini. Desktop alerts, sounds, click-to-focus, and webhooks. macOS, Linux, and Windows.
Other commands on claude-notifications-go.
notifications-settings
Alias for settings — Configure notification sounds and settings

