Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ its own installation cache; that cache is a generated copy, not a separate sourc
Start a new Codex task after installation. Review/trust the plugin's hooks in Codex's `/hooks` UI;
installation does not automatically trust lifecycle hooks. Tools and skills work independently.

Claude's marketplace installation is also supported:
Claude's marketplace installation is also supported, in Claude Code:

```text
/plugin marketplace add sameeeeeeep/switchboard
/plugin install switchboard@switchboard
/plugin install switchboard --marketplace sameeeeeeep/switchboard-plugin
```

`sameeeeeeep/switchboard-plugin` is a ~2 MB mirror of this directory made by `plugin/publish.sh`, so
the install doesn't clone this whole repo. Its marketplace is also named `switchboard`, so the plugin
id stays `switchboard@switchboard`; an existing `/plugin marketplace add sameeeeeeep/switchboard`
keeps working.

Use one installation route per host. The checkout installer detects an enabled Claude plugin and
avoids adding a standalone duplicate. Repo `.claude/skills/*` entries are discovery symlinks to the
canonical skills here, not separately maintained copies.
Expand Down
73 changes: 73 additions & 0 deletions plugin/publish.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/bin/sh
# Mirror this plugin to its own small repo, github.com/sameeeeeeep/switchboard-plugin.
#
# The source of truth stays here. The small repo exists so `/plugin install switchboard
# --marketplace sameeeeeeep/switchboard-plugin` clones ~2 MB instead of the whole switchboard repo
# (~600 MB on disk), which can pass Claude Code's 120 s clone limit on slow connections.
# The marketplace keeps the name `switchboard`, so the plugin id stays `switchboard@switchboard`.
#
# node plugin/connector/build.mjs && plugin/publish.sh # bump .claude-plugin/plugin.json first
set -eu
cd "$(dirname "$0")"

REPO=sameeeeeeep/switchboard-plugin
VERSION=$(python3 -c 'import json; print(json.load(open(".claude-plugin/plugin.json"))["version"])')
TMP=$(mktemp -d)
trap 'rm -rf "$TMP"' EXIT

gh repo clone "$REPO" "$TMP/repo" -- -q
(cd "$TMP/repo" && git rm -rq --ignore-unmatch . >/dev/null)

# Tracked files only, so local caches (__pycache__, etc.) never ship.
git ls-files -z . | (cd "$TMP/repo" && xargs -0 -I{} sh -c 'mkdir -p "$(dirname "{}")"')
git ls-files -z . | xargs -0 -I{} cp -p "{}" "$TMP/repo/{}"
cp ../LICENSE "$TMP/repo/LICENSE"

cat > "$TMP/repo/.claude-plugin/marketplace.json" <<'EOF'
{
"name": "switchboard",
"description": "Switchboard for Claude Code: the operator connector and skills for the Switchboard Mac app.",
"owner": { "name": "sameeeeeeep", "url": "https://github.com/sameeeeeeep/switchboard" },
"plugins": [
{
"name": "switchboard",
"source": "./",
"description": "One Switchboard connector and operator skills for Claude Code and Codex: tasks, notch, whiteboard, PIP, and wrapps."
}
]
}
EOF

# Lead the mirrored README with the install that applies to this repo.
{
cat <<'EOF'
# Switchboard plugin for Claude Code

Mirror of [`plugin/`](https://github.com/sameeeeeeep/switchboard/tree/main/plugin) in the
Switchboard repo, published here so installing it downloads ~2 MB instead of the whole repo.
Edit the source there, not here.

Install, in Claude Code:

```text
/plugin install switchboard --marketplace sameeeeeeep/switchboard-plugin
```

The visible surfaces (notch, whiteboard, PIP) need the [Switchboard Mac app](https://thelastprompt.ai/switchboard).

---

EOF
cat README.md
} > "$TMP/repo/README.md"

cd "$TMP/repo"
claude plugin validate --strict . >/dev/null
git add -A
if git diff --cached --quiet; then
echo "no changes to publish"
else
git commit -qm "switchboard plugin $VERSION (mirrored from sameeeeeeep/switchboard plugin/)"
git push -q origin HEAD:main
fi
echo "published $REPO ($VERSION)"
Loading