What makes bpr different
A thin adapter over the official Beeper SDK, shaped end to end around how an LLM agent actually reads, decides, and acts.
# Short stable ids — raw Matrix ids never escape
Every chat, message, account, and contact is shown as a short prefixed handle (CHT-, MSG-, ACC-, USR-). The opaque Beeper/Matrix id is accepted as input and stored behind the handle, but it is never displayed — so a multi-line room id can't blow up an agent's context, and the same handle round-trips into the next command unchanged.
⇄ Adaptive output — table on a TTY, JSON when piped
bpr detects whether stdout is a terminal. A human at a prompt gets a dense, aligned table; the moment output is piped or redirected it becomes clean JSON, with no flag to remember. The pipe itself is the signal — though --json forces it either way.
⌕ Compact query syntax — filters mixed with words
search and count take literal search words alongside compact filters: from:me, has:media|image|video|link|file, is:group|single, and after:/before: accepting a date, an RFC3339 time, or a relative offset like 7d, 2w, or 12h. Results are ranked by relevance, so the most useful match lands first.
! Structured errors — code, hint, exit code
Failures aren't a stack trace. Each carries a stable code, a human message, an actionable hint, and a category — and maps to a deterministic exit code, so a script or agent can branch on the failure instead of scraping text.
◆ The prime contract — one command to orient
bpr prime emits the full agent-orientation document: every command, the id shapes, the output rules, the query grammar, and the error model. Pipe it as JSON straight into a system prompt, and the agent knows the whole surface before its first real call.
◷ Watch without a daemon — pull-style updates
Subscribe to a chat, and watch check returns only the messages newer than your last check before advancing a watermark stored in your config. There is no background process: bpr stays strictly one-shot, so a cron job or an agent loop owns the cadence.
How it compares
| Capability | bpr | Raw Beeper SDK | Generic chat CLI |
|---|---|---|---|
| Stable short ids | Built in (CHT-/MSG-…) | Raw Matrix ids | Varies |
| JSON on pipe, table on TTY | Automatic | You write the code | Flag, if any |
| Compact query filters | from:/has:/is:/after: | — | Rarely |
| Structured errors + exit codes | code · hint · category | Go errors | Text on stderr |
| Agent orientation contract | bpr prime | — | — |
| Daemonless watch | Pull-style watermark | Build it yourself | Long-running |