8000 GitHub - agonist/blood-rush: Blood Rush is a local-first macOS workspace for supervising AI agents, jobs, and webhooks · GitHub
[go: up one dir, main page]

Skip to content

About

Blood Rush is a local-first macOS workspace for supervising AI agents, jobs, and webhooks

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Blood Rush app icon

Blood Rush

A local command center for agent output.

CI status MIT License macOS Local-first, no account required

Blood Rush Channels view, showing agent and integration events with the selected event details

One native workspace for agent output, attention state, and event detail.

Your agents can work unattended. Blood Rush is where their output lands when you need to notice it.

Give every agent, job, and integration its own local channel. Blood Rush keeps the message, raw payload, run status, and notification policy in one native Mac workspace—so you can scan what happened, focus on what needs attention, and mark it handled.

Agent run / scheduled job / integration
  -> dedicated Blood Rush channel
  -> local relay + event history
  -> Needs Attention queue + native notification
  -> you

Agents send ordinary JSON to their channel's webhook URL. Blood Rush is local-first: the relay, event history, configuration, and Mac app run on your machine. There are no accounts, hosted dashboard, billing gates, or channel caps.

Built For Agent Supervision

  • One channel per worker. Keep a research agent, deployment job, support triage, and provider integrations legible instead of mixing them in chat.
  • Attention, not noise. Use blocked, failed, or needs_review status when a run needs you; keep routine completions in the local history.
  • Inspect before you switch context. Open an event to see its message, run status, URL, and raw payload, then mark it handled when you are done.
  • Local by default. Your relay, history, configuration, and webhook token stay on your Mac.

Connect an agent · Contribute · Security · Usage guide

Choose How To Run It

Goal Command What stays running
Connect an agent that runs elsewhere pnpm start:tunnel Blood Rush and a temporary public tunnel in the foreground
Test an agent that runs on this Mac pnpm start Blood Rush in the foreground, using localhost
Install Blood Rush on this Mac pnpm local:install A user LaunchAgent keeps the relay running

Most users should begin by giving one agent a public HTTPS channel. The quick start below creates a temporary URL that a hosted agent, remote job, or provider can reach.

Quick Start: Give An Agent A Channel

Goal: send one agent event through a public HTTPS URL and see it in the Needs Attention queue on your Mac.

1. Check The Requirements

  • macOS 13+
  • Node.js 22.12+
  • pnpm 9.11+
  • Bun 1.1+
  • Xcode and XcodeGen
  • cloudflared for the default public tunnel

Clone the repository and enter it:

git clone https://github.com/agonist/blood-rush.git
cd blood-rush

You can verify the local development toolchain before starting:

pnpm local:bootstrap --check

The start command runs the full bootstrap, including pnpm install, database setup, and Xcode project generation. You do not need to install workspace dependencies separately.

2. Start The Tunnel And Blood Rush

From the repository root:

pnpm start:tunnel

Leave this terminal running. The command:

  1. Starts a Cloudflare Quick Tunnel to the local relay.
  2. Waits for its public https://*.trycloudflare.com URL.
  3. Bootstraps the checkout.
  4. Starts the relay, builds the Debug Mac app, and launches it.
  5. Gives the app the public base URL so Settings shows public webhook URLs.

The first build can take a few minutes. On first launch, complete onboarding and allow notifications. Events still appear in Blood Rush without notification permission, but macOS banners will not appear.

3. Create An Agent Channel

Copy the public tunnel origin printed by the first terminal. Open a second terminal, return to the repository root, and run:

pnpm webhook:urls \
  --base https://your-tunnel.trycloudflare.com \
  --channel pricing-scout

The command prints a ready-to-use endpoint:

pricing-scout      https://your-tunnel.trycloudflare.com/in/<token>/pricing-scout

Copy the entire URL after pricing-scout. If the command says no token exists, wait until the Mac app has launched, then rerun it.

You can also create an Agent channel in Blood Rush Settings and copy its Webhook URL there.

4. Send A Test Agent Event

Paste the complete URL from the previous step into this command:

curl "<paste-webhook-url-here>" \
  -H "content-type: application/json" \
  -d '{
    "title": "Pricing brief needs review",
    "body": "Seven products changed price overnight.",
    "url": "https://example.com/brief",
    "event_type": "brief_ready",
    "status": "needs_review",
    "run_id": "pricing-scout-042",
    "bloodrush": {
      "channel": {
        "name": "Pricing Scout",
        "glyph": "PS",
        "hue": "blue",
        "kind": "agent"
      }
    }
  }'

The relay should return:

{ "ok": true }

The event should appear in Needs Attention and as a native macOS notification. Select it to inspect the run details and raw payload.

5. Wire It Into Your Agent

At the end of a run, have the agent POST an event with the same shape. Use blocked, failed, or needs_review as the status when the run needs a human; routine completed events stay in the local history.

See docs/USAGE.md for the full event contract, including links, event types, run IDs, channel profile hints, and notification policies.

6. Add Provider Integrations

Blood Rush also works with provider webhooks. Use a provider channel slug when you want built-in parsing and signature handling:

pnpm webhook:urls --base https://your-tunnel.trycloudflare.com --channel stripe
pnpm webhook:urls --base https://your-tunnel.trycloudflare.com --channel github
pnpm webhook:urls --base https://your-tunnel.trycloudflare.com --channel polar

The Quick Tunnel URL is temporary. The tunnel and Blood Rush terminal must stay running, and pressing Ctrl-C stops both. A later run will usually produce a different URL, so do not use this path as a permanent provider endpoint.

Webhook URLs contain the local relay token. Treat them as secrets while they are active.

Local Agent Test

Use this path when an agent runs on the same Mac and does not need a public URL. cloudflared is not required.

Start Blood Rush:

pnpm start

After the app launches, open a second terminal:

pnpm webhook:urls --channel pricing-scout

Copy the printed http://localhost:8787/in/<token>/pricing-scout URL and use it with the same agent event from the quick start.

Install Blood Rush On This Mac

The quick-start commands are foreground development paths. For a normal local installation, run:

pnpm local:install --dry-run
pnpm local:install

The installer does not need an administrator password. It:

  • installs Blood Rush.app in ~/Applications;
  • installs and starts a user LaunchAgent for the local relay;
  • stores local configuration under ~/.bloodrush;
  • launches the installed app.

Check the installed setup with:

pnpm local:doctor --show-urls

Permanent External Webhooks

A reliable external webhook setup needs a stable public HTTPS URL and a tunnel service that starts automatically. Once that URL forwards to http://localhost:8787, install Blood Rush with the same origin:

pnpm local:install \
  --tunnel-url https://webhooks.your-domain.example

Use an origin only. Do not include /in/<token>/<channel>, a query string, or a fragment.

The Blood Rush installer keeps the relay running, but it does not install or configure your tunnel service. Configure that service to start at login, and add ~/Applications/Blood Rush.app to macOS Login Items if you want the menu bar app to launch automatically.

Do not save a random trycloudflare.com Quick Tunnel URL as a permanent base; it stops working when that tunnel process ends. See docs/TUNNELS.md for stable tunnel options.

Uninstall

pnpm local:uninstall --dry-run
pnpm local:uninstall

Pass --remove-app to remove ~/Applications/Blood Rush.app too. Local config, token, and event history remain in place so a reinstall can reuse them.

Use Blood Rush

Blood Rush has two main full-window views:

  • Channels shows live output. Filter by All Output, Needs Attention, or an individual channel, then inspect the selected message and raw payload.
  • Settings manages channels, webhook URLs, signing secrets, notification policies, templates, and sounds.

Create a channel from the plus button in Channels or Add channel in Settings. Its slug becomes the last segment of its webhook URL:

https://your-public-origin.example/in/<token>/<channel-slug>

See docs/USAGE.md for channel creation, payload fields, attention handling, and notification customization.

Troubleshooting

Start with:

pnpm local:doctor
pnpm local:doctor --show-urls

Common first-run problems:

  • cloudflared is missing: install it or use the local-only path.
  • No token exists: launch the Mac app once, then rerun pnpm webhook:urls.
  • The event appears but no banner shows: allow notifications during onboarding or check Sound & Focus in Settings.
  • An external sender cannot connect: confirm the tunnel, relay, and Mac are awake and running.
  • A base URL is rejected: pass the origin only, such as https://webhooks.example.com.

Common Commands

pnpm start                  # Bootstrap and run locally
pnpm start:tunnel           # Bootstrap and run with a temporary public URL
pnpm start:tunnel --dry-run # Print the tunnel-first plan
pnpm local:install          # Install app and relay LaunchAgent
pnpm local:doctor           # Diagnose the local setup
pnpm webhook:urls           # Print URLs using the configured base
pnpm webhook:urls --channel stripe

Lower-level development commands:

pnpm local:bootstrap
pnpm local:run
pnpm local:setup
pnpm local:relay
pnpm mac:generate
pnpm mac:build

Local Data And Security

Blood Rush stores its local state here:

~/.bloodrush/config.toml
~/.bloodrush/bloodrush.sqlite
~/Library/Application Support/Blood Rush/token

The config may contain provider signing secrets, and the token authenticates webhook URLs. If a URL leaks, regenerate the token from Settings -> About and update every sender that used the old URL.

Back up or restore the config and token with:

pnpm local:export --output ~/Desktop/bloodrush-backup
pnpm local:import --dry-run --input ~/Desktop/bloodrush-backup
pnpm local:import --input ~/Desktop/bloodrush-backup

Treat backup directories as private.

Project Layout

  • apps/api: Bun relay, webhook verification, SQLite history, and live stream.
  • apps/mac: native SwiftUI menu bar app.
  • apps/landing: static Astro project website.
  • packages/shared: shared copy, tokens, and integration registry.

More Documentation

License

MIT. See LICENSE.

About

Blood Rush is a local-first macOS workspace for supervising AI agents, jobs, and webhooks

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0