diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json new file mode 100644 index 0000000..55577f4 --- /dev/null +++ b/.claude-plugin/marketplace.json @@ -0,0 +1,13 @@ +{ + "name": "tea", + "owner": { + "name": "naudachu" + }, + "plugins": [ + { + "name": "tea", + "source": "./", + "description": "Gitea CLI (tea) reference plus a mandatory-login guard. Ships /tea:login, /tea:use, and a PreToolUse hook that blocks any tea command that would touch Gitea without --login." + } + ] +} diff --git a/README.md b/README.md index 3fc5942..ffda5f5 100644 --- a/README.md +++ b/README.md @@ -19,21 +19,29 @@ A Claude Code plugin that gives Claude a reference for the `tea` CLI and enforce ## Installation -Clone this repo into your Claude Code plugins directory: +This is a Claude Code plugin — install it through the plugin marketplace, not by hand-editing `settings.json`. -```bash -git clone ~/.claude/plugins/tea -``` +1. Register this repo as a marketplace: -Then add it to your project's `.claude/settings.json`: + ``` + /plugin marketplace add https://git.noodles.cam/claude-skills/tea.git + ``` -```json -{ - "plugins": ["~/.claude/plugins/tea"] -} -``` + Already have a local clone? Point at the directory instead: -Or to your global settings (`~/.claude/settings.json`) to enable it everywhere. + ``` + /plugin marketplace add /path/to/tea + ``` + +2. Install the plugin: + + ``` + /plugin install tea@tea + ``` + +The skills (`/tea:login`, `/tea:use`) and the `tea-guard` hook load immediately. Use `/plugin` to enable, disable, or update it later. + +> The marketplace registration is written to `extraKnownMarketplaces` and the plugin to `enabledPlugins` in your settings automatically — you don't edit those by hand. There is **no** top-level `"plugins"` settings key; if you've added one from older instructions, remove it. ## First use @@ -61,7 +69,9 @@ This prevents silent fallback to the machine's default login (often a personal a ## Project layout ``` -.claude-plugin/plugin.json plugin manifest +.claude-plugin/ + plugin.json plugin manifest + marketplace.json marketplace catalog (makes `/plugin install` work) hooks/ hooks.json registers the PreToolUse hook tea-guard.sh the guard (Python 3, no deps)