Skip to content

Commit 0ceb4f7

Browse files
illeatmyhatclaude
andcommitted
fix: install Claude plugin via marketplace instead of direct path
The `claude plugin install <path>` command requires the plugin to exist in a configured marketplace. This updates install_claude to first register the marketplace (local if .claude-plugin/marketplace.json exists, otherwise AgentToolkit/altk-evolve on GitHub), then install evolve-lite from it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 32cb885 commit 0ceb4f7

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

platform-integrations/install.sh

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -749,14 +749,34 @@ def install_claude(source_dir, target_dir):
749749
plugin_source = Path(source_dir) / "platform-integrations" / "claude" / "plugins" / "evolve-lite"
750750
info(f"Installing Claude plugin from {plugin_source}")
751751
752+
marketplace_dir = Path(target_dir).resolve()
753+
has_local_marketplace = (marketplace_dir / ".claude-plugin" / "marketplace.json").is_file()
754+
marketplace_source = str(marketplace_dir) if has_local_marketplace else EVOLVE_REPO
755+
if has_local_marketplace:
756+
info(f"📁 Marketplace source: {_c('1', marketplace_source)} (local)")
757+
else:
758+
info(f"🌐 Marketplace source: {_c('1', marketplace_source)} (GitHub)")
752759
claude = shutil.which("claude")
753760
if claude:
754761
if DRY_RUN:
755-
dryrun(f"run: claude plugin install {plugin_source.resolve()}")
762+
dryrun(f"run: claude plugin marketplace add {marketplace_source}")
763+
dryrun(f"run: claude plugin install evolve-lite@evolve-marketplace")
756764
return
757765
try:
758766
result = subprocess.run(
759-
[claude, "plugin", "install", str(plugin_source.resolve())],
767+
[claude, "plugin", "marketplace", "add", marketplace_source],
768+
capture_output=True, text=True
769+
)
770+
if result.returncode != 0:
771+
warn(f"claude plugin marketplace add exited with code {result.returncode}")
772+
if result.stderr.strip():
773+
warn(f" {result.stderr.strip()}")
774+
else:
775+
if result.stdout.strip():
776+
print(f" {result.stdout.strip()}")
777+
778+
result = subprocess.run(
779+
[claude, "plugin", "install", "evolve-lite@evolve-marketplace"],
760780
capture_output=True, text=True
761781
)
762782
if result.returncode == 0:
@@ -772,12 +792,11 @@ def install_claude(source_dir, target_dir):
772792
warn(f"claude plugin install failed: {e}")
773793
774794
# Fallback: manual instructions
775-
abs_path = plugin_source.resolve()
776795
warn("Could not install Claude plugin automatically. To install manually, run:")
777796
print()
778-
print(f" claude --plugin-dir {abs_path}")
797+
print(f" claude plugin marketplace add {marketplace_source}")
798+
print(f" claude plugin install evolve-lite@evolve-marketplace")
779799
print()
780-
print(" Or add this to your Claude startup command.")
781800
782801
783802
def uninstall_claude(target_dir):

0 commit comments

Comments
 (0)