Files
leo-claude-mktplace/scripts/switch-profile.sh
lmiranda 8781179fd0 feat(marketplace): add lean/full profile switching for token optimization
- Add marketplace-lean.json (6 plugins) and marketplace-full.json (12 plugins)
- Add .mcp-lean.json (gitea only) and .mcp-full.json (5 servers)
- Create scripts/switch-profile.sh for easy profile switching
- Update sprint-status.md with conditional skill loading
- Set lean profile as default (~14k token savings)

Lean profile includes: projman, git-flow, pr-review, clarity-assist,
code-sentinel, doc-guardian

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 12:22:36 -05:00

56 lines
2.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Switch between marketplace profiles
# Usage: ./scripts/switch-profile.sh [lean|full]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
MARKETPLACE_DIR="$ROOT_DIR/.claude-plugin"
case "${1:-lean}" in
lean)
cp "$MARKETPLACE_DIR/marketplace-lean.json" "$MARKETPLACE_DIR/marketplace.json"
cp "$ROOT_DIR/.mcp-lean.json" "$ROOT_DIR/.mcp.json"
echo "Switched to LEAN profile (6 plugins, 1 MCP server)"
echo ""
echo "Plugins: projman, git-flow, pr-review, clarity-assist, code-sentinel, doc-guardian"
echo "MCP: gitea only"
echo ""
echo "Restart Claude Code session for changes to take effect."
;;
full)
cp "$MARKETPLACE_DIR/marketplace-full.json" "$MARKETPLACE_DIR/marketplace.json"
cp "$ROOT_DIR/.mcp-full.json" "$ROOT_DIR/.mcp.json"
echo "Switched to FULL profile (12 plugins, 5 MCP servers)"
echo ""
echo "Plugins: all"
echo "MCP: gitea, netbox, data-platform, viz-platform, contract-validator"
echo ""
echo "Restart Claude Code session for changes to take effect."
;;
status)
# Check current profile by comparing files
if diff -q "$MARKETPLACE_DIR/marketplace.json" "$MARKETPLACE_DIR/marketplace-lean.json" >/dev/null 2>&1; then
echo "Current profile: LEAN (6 plugins, 1 MCP server)"
elif diff -q "$MARKETPLACE_DIR/marketplace.json" "$MARKETPLACE_DIR/marketplace-full.json" >/dev/null 2>&1; then
echo "Current profile: FULL (12 plugins, 5 MCP servers)"
else
echo "Current profile: CUSTOM (marketplace.json differs from both profiles)"
fi
;;
*)
echo "Usage: $0 [lean|full|status]"
echo ""
echo "Profiles:"
echo " lean — 6 core plugins (projman, git-flow, pr-review, clarity-assist, code-sentinel, doc-guardian)"
echo " 1 MCP server (gitea only)"
echo " full — All 12 plugins"
echo " 5 MCP servers (gitea, netbox, data-platform, viz-platform, contract-validator)"
echo " status — Show current profile"
echo ""
echo "Note: Restart Claude Code session after switching for changes to take effect."
exit 1
;;
esac