# So Pushy > So Pushy sends push alerts to a person's phone and browser. Use it to tell the person you work for when something needs them. ## Set up (once per project) 1. Run `npx so-pushy setup --label ""` in the project folder (Node 20 or later). Add `--json` to get one JSON object per line. 2. It prints a code and a link. Show both to the person and ask them to open the link, check the code matches, and tap Approve. They sign up there if they have no account. Do not open the link or approve for them. 3. Wait. The command keeps polling until they approve, then saves `SOPUSHY_KEY` and `SOPUSHY_CHANNEL` to `.env` and sends a test alert. 4. Exit codes: 0 done, 1 bad usage or request, 2 the person denied it, 3 the code expired (run setup again), 4 So Pushy unreachable. The key can only send, and only to that project's channel. If `.env` already holds a working key, setup only sends the test. If setup warns that `.env` is not gitignored, add it to `.gitignore`. ## When to alert - You finished a long task the person is waiting on. - You are blocked and need an answer, a decision, a login or an approval. - Something failed and you cannot fix it: a deploy, a migration, CI on the main branch. ## When not to alert - Progress updates, routine steps that worked, or anything the person will see anyway when they come back. - More than one alert for the same thing. Send one, then wait. ## Priority - `normal` (default): finished, or a question that can wait. - `high`: blocked, or something failed. - `emergency`: only when a person must act now, such as production down or data at risk. It repeats until acknowledged. - `low` and `lowest`: worth keeping in the inbox, not worth a buzz. ## Send Every send needs `source` (your agent or project), `event` (such as `task.done` or `deploy.failed`), a unique `idempotency_key` and `notify.title`. Sends with the same `source` and `idempotency_key` within 24 hours are delivered once, so retrying is safe. Keep the title short, and put details in `notify.message` (up to 1,024 characters) and a link in `notify.url`. CLI (`.env` is not loaded for you): ```sh set -a && . ./.env && set +a npx so-pushy notifications send --source my-agent --event task.done --idempotency_key task-42-done \ --notify.title "Migration finished" --notify.channel "$SOPUSHY_CHANNEL" ``` REST: ```sh curl -X POST https://sopushy.app/api/v1/notifications -H "authorization: Bearer $SOPUSHY_KEY" -H 'content-type: application/json' \ -d '{"source":"my-agent","event":"task.done","idempotency_key":"task-42-done","notify":{"title":"Migration finished","channel":"'"$SOPUSHY_CHANNEL"'","priority":"normal"}}' ``` MCP: `POST https://sopushy.app/api/mcp` (Streamable HTTP) with `Authorization: Bearer $SOPUSHY_KEY`. Call the tool `notifications_send` with the same fields; nested fields use dots, such as `notify.title`. ## Watch a scheduled job To be told when a cron job, backup or script stops running, use an inactivity monitor: the job calls a URL each time it runs, and the person gets one alert when a call is late. Your setup key cannot create monitors, so ask the person to create one in Settings › Channels › Inactivity monitors at https://sopushy.app/settings/channels and give you its URL. Save it as `SOPUSHY_MONITOR_URL` in `.env`, never in code, and add this as the job's last step: ```sh curl -fsS "$SOPUSHY_MONITOR_URL" > /dev/null ``` An admin key can also create one with `npx so-pushy monitors create --slug --name "Nightly backup" --interval_minutes 1440`, the MCP tool `monitors_create` or `POST https://sopushy.app/api/v1/channels//monitors`. ## Keep the key secret - Never print `SOPUSHY_KEY`, commit it, put it in code or write it to logs. Read it from the environment. - The person can revoke it in Settings › Keys at https://sopushy.app/settings/keys. ## More - People's guide: https://sopushy.app/agents - Skill for Claude Code, Codex and other agents: `npx so-pushy skill install` (or https://sopushy.app/skill/SKILL.md) - `npx so-pushy` lists every command; `--help` after a command lists its options.