Automated Tests

just test runs unit tests plus integration tests against Postgres and Redis (started automatically if not already running). Neither task runs the E2E suites in buzz-test-client — those are marked #[ignore] and require a running relay:

Live Local Relay

The fastest way to exercise the relay end-to-end is to build the release binaries once, run buzz-relay, and drive it with the buzz CLI. The CLI signs every request with NIP-98, so you don’t need nak or hand-rolled curl.

1. Setup

Already running Buzz Desktop? Desktop uses the same Docker container names (buzz-postgres, buzz-redis) and the same default ports (:5432, :6379). just setup will reuse those services, so your test relay writes into Desktop’s database. That’s fine for read/write smoke tests, but: just reset wipes Desktop’s data along with yours. If you need isolation, stop Desktop first or run the dev stack on a different Compose project (COMPOSE_PROJECT_NAME=buzz-dev docker compose …).
just reset wipes all local data and starts over — including Buzz Desktop’s data if its services are sharing your dev stack (see callout above).
Heads up — scrub stale env first. If your shell inherits any of BUZZ_AUTH_TAG, BUZZ_RELAY_URL, or BUZZ_PRIVATE_KEY from a prior session (or a staging config), unset them before continuing. A stale BUZZ_AUTH_TAG fails the local dev relay with auth_error: signature verification failed on the first CLI write — it is not tolerated.

2. Build the binaries

Rebuild after any code change — the steps below use the release binaries.

3. Start the relay

In a separate terminal (it runs in the foreground):
Verify it’s up (back in your working terminal):
Health/readiness/liveness live on a separate port (default 8080, BUZZ_HEALTH_PORT) so K8s probes bypass auth middleware. The main app port also exposes /health for convenience.
The relay starts in dev mode (BUZZ_REQUIRE_AUTH_TOKEN=false). The startup log emits a WARN about this — that’s expected for local testing. See the env vars table at the bottom if you need to lock it down.
Already running Buzz Desktop (or another relay) on :3000 / :8080 / :9102? Buzz binds three ports — main, health, metrics — and any of them can collide. Use a separate terminal per role and export the right vars in each: In the relay terminal (before launching buzz-relay):
In your working / CLI terminal (for steps 4+ and the ACP harness):
Every snippet later in this doc shows the defaults. When you see localhost:3000 / :8080 in a code block, mentally substitute your overrides — or the CLI will end up talking to Buzz Desktop’s relay.
Ignore just setup’s “Next steps” banner. It still prints just relay (a debug build). Use buzz-relay from step 2 here — step 2 already built the release binary.
When you’re done, stop the relay (Ctrl-C in its terminal). If it’s backgrounded or you lost the terminal: pkill -f buzz-relay. Leaving it running will collide with the next reviewer who follows this doc on the same machine.

4. Smoke test the CLI against the relay

End-to-end: generate an identity, create a channel, post a message, read it back. This is the minimum sequence an agent needs to verify a local relay.
A successful run prints {"event_id":"…","accepted":true,"message":""} for the send, and the message body in the get output. thread returns [] for a leaf message — populated only after a reply comes in (see §5).

5. Going deeper

For full coverage of every CLI command (54 subcommands across 12 groups), follow crates/buzz-cli/TESTING.md. The relay’s HTTP bridge accepts three endpoints — useful if you’re testing a client other than buzz-cli: All three accept NIP-98 auth (recommended) or, in dev mode, an X-Pubkey header fallback. There is no REST API for fetching message threads — use POST /query with an #e filter, or buzz messages thread.

ACP Harness (optional, end-to-end with a real agent)

buzz-acp connects an ACP-speaking agent (goose, codex, claude code, buzz-agent) to the relay. The harness listens for events, drives the agent over stdio, and the agent replies through MCP tools. Minimum recipe — assumes the relay from step 3 is running and the channel $CHANNEL from step 4 still exists. The agent identity must be different from the sender identity (BUZZ_ACP_RESPOND_TO=anyone still skips events the agent signed itself).
Using a different ACP agent? The default recipe assumes goose is on $PATH and configured (goose --version should print). For codex / claude code / buzz-agent, set BUZZ_ACP_AGENT_COMMAND and BUZZ_ACP_AGENT_ARGS accordingly — see crates/buzz-acp/README.md. Without these, buzz-acp will fail to spawn the agent subprocess on startup.
If you started the agent before adding it to the channel, just run the add-member afterwards — it picks up the membership notification live and subscribes without restart (membership notification: subscribing to new channel …). The justfile also ships just goose key="$AGENT_NSEC" (foreground) and just goose-bg key="$AGENT_NSEC" (background screen session) which set the same env. See crates/buzz-acp/README.md for parallel agents, heartbeats, respond-to gates, and forum subscriptions. To exercise deferred ACP startup, add BUZZ_ACP_LAZY_POOL=true before launching buzz-acp. The harness should connect, authenticate, subscribe, and publish online presence without starting the configured ACP child. The first accepted, flushable mention should start exactly one child and then dispatch the queued message. Automated coverage in pool_lifecycle_state pins single-wake, retry/backoff, and stale-result behavior; it does not replace this real relay/process smoke test. Send the agent a task — switch your shell back to the sender identity from step 4 and @mention the agent:
Replies are kind:9 in the same channel; buzz messages thread --channel <id> --event <event_id> fetches the reply chain for a specific mention.

Configuration reference

The relay reads all configuration from environment variables. Defaults work out of the box with just setup or just relay. Common overrides: CLI-side, only two matter for testing:

Troubleshooting