feat(plugin): ship Claude Code plugin + marketplace manifest
Adds a /plugin marketplace at the repo root and a `claude-mailbox` plugin under plugin/ that wires the UserPromptSubmit hook without needing the per-user `install-hook` step. The hook command (`claude-mailbox check --hook`) now reads the mailbox name from $CLAUDE_MAILBOX_NAME when --name is omitted and emits a one-line setup hint when the daemon is unreachable, so a missing daemon is loud instead of invisible. The plugin only contains the Claude Code glue — the daemon binary is still a separate prerequisite (`npm i -g @kuns/claude-mailbox` + install-autostart), and the plugin/README plus main README spell out the three-step setup.
This commit is contained in:
22
README.md
22
README.md
@@ -104,6 +104,28 @@ claude-mailbox uninstall-service [--purge]
|
||||
|
||||
The .NET and Node builds are wire-compatible (same port, same `X-Mailbox` header, same MCP tool names, same SQLite schema), so a `.mcp.json` configured against one works against the other.
|
||||
|
||||
## Use from Claude Code (plugin)
|
||||
|
||||
Easiest path for colleagues — install the marketplace once, then the plugin:
|
||||
|
||||
```
|
||||
/plugin marketplace add https://git.kuns.dev/releases/ClaudeMailbox
|
||||
/plugin install claude-mailbox@claude-mailbox
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
Then set a per-machine mailbox name:
|
||||
|
||||
```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.
|
||||
|
||||
## Use from a Claude session
|
||||
|
||||
Drop this into your project's `.mcp.json` (one per session, different `X-Mailbox` values):
|
||||
|
||||
Reference in New Issue
Block a user