Skip to content

Commit 145bdaf

Browse files
feat(plugin): proper Claude Code marketplace registration
- Add .claude-plugin/marketplace.json so the workit repo is a valid Claude Code marketplace (automagik-workit) - install.sh now uses `claude plugin marketplace add` + `claude plugin install` with symlink fallback for environments without claude CLI - Add openclaw.extensions entry + configSchema for OpenClaw registration - Add minimal index.js entry point for OpenClaw plugin loader
1 parent 24574c7 commit 145bdaf

2 files changed

Lines changed: 27 additions & 11 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
2-
"$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3-
"name": "workit",
4-
"description": "Office work CLI toolkit for agents — Google Workspace + DOCX editing",
5-
"owner": { "name": "Automagik" },
2+
"name": "automagik-workit",
3+
"owner": {
4+
"name": "Automagik"
5+
},
6+
"metadata": {
7+
"description": "Plugins by Automagik — Google Workspace tools",
8+
"homepage": "https://github.com/automagik-dev/workit"
9+
},
610
"plugins": [
711
{
812
"name": "workit",
9-
"description": "Agent-native CLI for Google Workspace. 18+ services, local DOCX editing, JSON-first output.",
1013
"version": "0.12.0",
11-
"author": { "name": "Automagik" },
12-
"source": ".",
13-
"category": "productivity"
14+
"source": "./plugins/workit",
15+
"description": "Agent-native CLI for Google Workspace. 18+ services, local DOCX editing, JSON-first output, least-privilege auth."
1416
}
1517
]
1618
}

install.sh

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,23 @@ ok "Plugin installed: ${PLUGIN_DIR}"
318318
# ---------------------------------------------------------------------------
319319
# Claude Code integration
320320
# ---------------------------------------------------------------------------
321-
mkdir -p "${HOME}/.claude/plugins"
322-
ln -sfn "$PLUGIN_DIR" "${HOME}/.claude/plugins/workit"
323-
ok "Claude Code plugin linked: ~/.claude/plugins/workit"
321+
if command -v claude > /dev/null 2>&1; then
322+
# Register workit repo as a marketplace and install the plugin
323+
claude plugin marketplace add https://github.com/automagik-dev/workit.git 2>/dev/null || true
324+
if claude plugin install workit@automagik-workit 2>/dev/null; then
325+
ok "Claude Code plugin installed: workit@automagik-workit"
326+
else
327+
# Fallback: symlink for older Claude Code versions
328+
mkdir -p "${HOME}/.claude/plugins"
329+
ln -sfn "$PLUGIN_DIR" "${HOME}/.claude/plugins/workit"
330+
ok "Claude Code plugin linked: ~/.claude/plugins/workit (fallback)"
331+
fi
332+
else
333+
# Claude Code not installed — symlink for when it is
334+
mkdir -p "${HOME}/.claude/plugins"
335+
ln -sfn "$PLUGIN_DIR" "${HOME}/.claude/plugins/workit"
336+
ok "Claude Code plugin linked: ~/.claude/plugins/workit"
337+
fi
324338

325339
# ---------------------------------------------------------------------------
326340
# Codex integration (optional)

0 commit comments

Comments
 (0)