Motivation
The CLI has comprehensive command help, but --help cannot answer whether a Buzz environment is actually ready to use. Today, troubleshooting usually means running a real command and interpreting the first error it returns.
A single safe preflight would help humans, agents, automation, and support reports answer:
- Is the local configuration present and parseable?
- Which public identity will sign requests?
- Is the relay reachable and does it return valid NIP-11 metadata?
- Is authentication accepted?
- Is the identity a member of the selected community?
Buzz Desktop has a Doctor surface for managed ACP runtimes, but that has a different scope and is unavailable in headless environments, containers, and servers.
Proposed solution
Add a root-level buzz doctor command that runs independent checks, aggregates the results rather than failing at the first problem, and never publishes events or changes local or remote state.
A useful first slice could include:
Local checks, available even with --offline:
- CLI version/build information
- relay URL presence, syntax, and canonicalization
BUZZ_PRIVATE_KEY presence and parseability, reporting only the derived public identity
BUZZ_AUTH_TAG syntax and basic consistency, without ever printing the tag
Read-only remote checks:
- DNS/TLS/network reachability
- NIP-11 retrieval and basic compatibility
- authenticated read access
- community membership and available role/scope information
- WebSocket connection or subscription readiness, without publishing an event
The command should use the existing global relay, key, auth-tag, and output-format options. Default structured output could follow the existing CLI convention, for example:
{
"status": "warning",
"checks": [
{
"id": "identity",
"status": "ok",
"message": "Signing identity is available"
},
{
"id": "relay",
"status": "error",
"message": "Relay is unreachable",
"remediation": "Check the relay URL and network connectivity"
}
]
}
Required behavior:
- Running with missing or invalid credentials reports those as check results instead of failing during CLI argument parsing.
--offline runs only local checks and clearly marks remote checks as skipped.
- Remote probes are read-only.
- All applicable checks run so one invocation can reveal multiple problems.
- Output and error messages never expose private keys, auth tags, bearer values, or signed request material.
- Check identifiers and structured fields are stable enough for automation.
- Exit behavior distinguishes a failed required check from warnings while preserving structured output. I would welcome maintainer guidance on whether warnings should still exit zero and how this should map onto the existing exit-code categories.
Suggested coverage:
- unit tests for aggregation, redaction, skipped checks, and exit precedence
- mocked relay tests for unreachable, malformed NIP-11, unauthenticated, and non-member cases
- a CLI-definition test proving
doctor --help remains available without credentials
For the initial version, local configuration plus NIP-11, read-only authentication, and membership checks may be enough; WebSocket readiness could follow separately if it adds too much scope.
Alternatives considered
- Run a harmless existing read command such as
channels list: this fails fast, does not cover local configuration, and can blur network, authentication, and membership failures.
- Use the Desktop Doctor: it diagnoses managed agent runtimes rather than CLI-to-community readiness and is not available headlessly.
- Use shell scripts and
curl: these duplicate Buzz signing/authentication behavior and make secret handling less reliable.
- Improve individual error messages only: useful, but it does not provide proactive, aggregated readiness information.
Additional context
Motivation
The CLI has comprehensive command help, but
--helpcannot answer whether a Buzz environment is actually ready to use. Today, troubleshooting usually means running a real command and interpreting the first error it returns.A single safe preflight would help humans, agents, automation, and support reports answer:
Buzz Desktop has a Doctor surface for managed ACP runtimes, but that has a different scope and is unavailable in headless environments, containers, and servers.
Proposed solution
Add a root-level
buzz doctorcommand that runs independent checks, aggregates the results rather than failing at the first problem, and never publishes events or changes local or remote state.A useful first slice could include:
Local checks, available even with
--offline:BUZZ_PRIVATE_KEYpresence and parseability, reporting only the derived public identityBUZZ_AUTH_TAGsyntax and basic consistency, without ever printing the tagRead-only remote checks:
The command should use the existing global relay, key, auth-tag, and output-format options. Default structured output could follow the existing CLI convention, for example:
{ "status": "warning", "checks": [ { "id": "identity", "status": "ok", "message": "Signing identity is available" }, { "id": "relay", "status": "error", "message": "Relay is unreachable", "remediation": "Check the relay URL and network connectivity" } ] }Required behavior:
--offlineruns only local checks and clearly marks remote checks as skipped.Suggested coverage:
doctor --helpremains available without credentialsFor the initial version, local configuration plus NIP-11, read-only authentication, and membership checks may be enough; WebSocket readiness could follow separately if it adds too much scope.
Alternatives considered
channels list: this fails fast, does not cover local configuration, and can blur network, authentication, and membership failures.curl: these duplicate Buzz signing/authentication behavior and make secret handling less reliable.Additional context
buzz users mewith awhoamialias. A doctor command should reuse the same local identity derivation if that lands, not introduce a competing identity command.doctor,diagnostic,health check,preflight, andtroubleshoot; I found no existing CLI diagnostics proposal.mainfound that--helpsucceeds across all exposed CLI command paths, so this proposal is about runtime readiness rather than help coverage.