pushbag
Documentation

Cursor

Send a Pushbag notification when Cursor finishes a turn and give the agent a packaged publishing guide.

On this page

Cursor project hooks can send a message when the agent loop stops. A stop event can mean completion, cancellation or an error, so the example reports that the turn ended.

Install the skill

Complete the CLI quickstart on the machine running Cursor. For notifications alone, use a Notifications key granted access to Personal. Install the packaged skill from your project directory:

pushbag guide pbg-pr-media --install
pushbag notify "Cursor setup check"

The project installation writes .agents/skills/pbg-pr-media/SKILL.md under the Git root, or the current directory outside Git. The skill describes how to publish review media. Keep the hook in the trusted project so that relative file paths resolve from its root. Confirm the setup check appears in Personal. The hook process needs the same CLI on its PATH and access to the saved profile or PUSHBAG_API_KEY.

Configure completion notifications

Add the following to .cursor/hooks.json, merging with any existing configuration.

{
  "version": 1,
  "hooks": {
    "stop": [
      {
        "command": "pushbag notify 'Cursor turn ended' >/dev/null && printf '{}'"
      }
    ]
  }
}

Start a turn in Cursor and ask it to summarize a file. When it finishes, check Personal in the dashboard or in the Inbox on your phone. See the Cursor hook reference.

Include the project name

For a project-specific message, replace the handler’s command field with this JSON member. These examples use a POSIX shell:

{
  "command": "pushbag notify \"Cursor stopped in ${PWD##*/}\" >/dev/null && printf '{}'"
}

For turns that produce a review, have the agent write review.html at the project root. Use a Both key granted Personal. Replace the command with a call to a shell script saved in the project:

{
  "command": "sh .cursor/publish-review.sh"
}
report="$PWD/review.html"
if [ -f "$report" ]; then
  pushbag upload "$report" --private --notify >/dev/null || exit 1
fi
printf '{}\n'

The hook publishes once per invocation while the report exists. Move the report after review if later turns should stay quiet. To test, create a small HTML report, finish a turn and open the version link in Personal.

Troubleshooting

Check that the event is lowercase stop and that the command returns a JSON object on stdout. A CLI receipt on stdout is not valid hook output. Keep the redirection in the example. Run command -v pushbag in the environment that launches the agent. If PATH differs from your shell, use the absolute executable path. Run pushbag config show and pushbag whoami there to check for a missing key or unexpected account. A Notifications key can send the setup message but lacks upload access. For report uploads use a Both key with a grant for the target channel. See key presets.

Packaged skill example

pushbag upload before-*.png after-*.png --public --title "PR <branch>" --json

Last updated