feat(plugin): add /claude-mailbox:mailbox-doctor for one-command setup
The doctor command runs entirely inside Claude Code and walks through: binary install via npm, daemon autostart, mailbox-name prompt with write to per-project `.claude/settings.json` env, and a self → self smoke test. Also adds `/claude-mailbox:mailbox-status` as a read-only health check. Reduces the colleague onboarding to: add marketplace, install plugin, run the doctor — no terminal context-switch required.
This commit is contained in:
16
README.md
16
README.md
@@ -106,25 +106,19 @@ The .NET and Node builds are wire-compatible (same port, same `X-Mailbox` header
|
||||
|
||||
## Use from Claude Code (plugin)
|
||||
|
||||
Easiest path for colleagues — install the marketplace once, then the plugin:
|
||||
Easiest path — everything happens inside Claude Code:
|
||||
|
||||
```
|
||||
/plugin marketplace add https://git.kuns.dev/releases/ClaudeMailbox
|
||||
/plugin install claude-mailbox@claude-mailbox
|
||||
/claude-mailbox:mailbox-doctor
|
||||
```
|
||||
|
||||
The plugin only wires the `UserPromptSubmit` hook. **The daemon binary is a separate prerequisite** — install it via the npm package above (or the bootstrap one-liner) and run `claude-mailbox install-autostart` so it starts on boot.
|
||||
The doctor command checks for the `claude-mailbox` binary, installs it if missing (via npm), runs `install-autostart` if the daemon isn't registered, prompts you for a mailbox name and writes it to `.claude/settings.json`, and finishes with a self → self smoke test.
|
||||
|
||||
Then set a per-machine mailbox name:
|
||||
After that, unread messages appear in context before every prompt. If the daemon is unreachable later, the hook emits a one-line setup hint instead of staying silent — missing setup is loud, not invisible.
|
||||
|
||||
```sh
|
||||
setx CLAUDE_MAILBOX_NAME alice # Windows
|
||||
export CLAUDE_MAILBOX_NAME=alice # macOS / Linux (in ~/.zshrc or ~/.bashrc)
|
||||
```
|
||||
|
||||
Restart Claude Code and unread messages will appear in context before every prompt. If the daemon is not reachable, the hook emits a one-line setup hint instead of staying silent — so a missing daemon is loud, not invisible.
|
||||
|
||||
See [`plugin/README.md`](./plugin/README.md) for the full walkthrough.
|
||||
See [`plugin/README.md`](./plugin/README.md) for details, including why each Claude session needs its own mailbox name.
|
||||
|
||||
## Use from a Claude session
|
||||
|
||||
|
||||
Reference in New Issue
Block a user