Skip to content

"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/

Python

**CLI-Hub** updated to **v0.2.0** โ€” the PyPI package now supports public CLIs from multiple install sources (`pip`, `npm`, `brew`, bundled/system tools), backed by a new `public_registry.json`. The Hub frontend was redesigned with separate **CLI-Anything CLIs** and **Public CLIs** decks, and live end-to-end checks now cover real install, update, and uninstall flows across both pip and npm packages.

yuhao92db509b239e
diff --git a/.gitignore b/.gitignore
index e2b01227a..a7d961b11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -246,6 +246,7 @@ assets/gen_typing_gif.py
# Step 10: Allow CLI Hub registry and frontend
!/registry.json
+!/public_registry.json
!/docs/
/docs/*
!/docs/hub/
diff --git a/README.md b/README.md
index c1bcbd77d..4f47f16f7 100644
--- a/README.md
+++ b/README.md
@@ -45,23 +45,32 @@ CLI-Anything: Bridging the Gap Between AI Agents and the World's Software</stron
> Thanks to all invaluable efforts from the community! More updates continuously on the way everyday..
-- **2026-04-13** ๐Ÿ““ **Obsidian CLI** merged (#211) โ€” knowledge management harness via Local REST API, 48 unit + 7 E2E tests. โ›“๏ธ **Eth2-Quickstart CLI** merged (#195) โ€” Ethereum staking node management harness. ๐Ÿ“š **Zotero CLI** updated to v0.4.1 (#201) โ€” now a standalone PyPI package with 52 MCP tools + 70 CLI commands.
+- **2026-04-15** ๐ŸŒ **CLI-Hub** updated to **v0.2.0** โ€” the PyPI package now supports public CLIs from multiple install sources (`pip`, `npm`, `brew`, bundled/system tools), backed by a new `public_registry.json`. The Hub frontend was redesigned with separate **CLI-Anything CLIs** and **Public CLIs** decks, and live end-to-end checks now cover real install, update, and uninstall flows across both pip and npm packages.
-- **2026-04-11** ๐Ÿ”— **n8n CLI** merged (#188) โ€” workflow automation harness. ๐Ÿ”ง **Exa CLI** fix (#205) โ€” added integration header for usage tracking. CLI-Hub auto-publish CI and PyPI package updates.
+- **2026-04-14** ๐Ÿงญ **Safari CLI** merged (#212) and added to the Hub registry โ€” browser automation via `safari-mcp`. ๐ŸŽฌ **Kdenlive** also received compatibility fixes for Gen 5 project output and invalid project generation.
-- **2026-04-10** ๐Ÿ“ฆ **CLI-Hub package manager** launched โ€” `pip install cli-anything-hub` to browse, install, and manage all CLIs. Download tracking via Umami analytics. Hub frontend updated with new install flow and "Empower yourself" toolkit card.
+- **2026-04-13** ๐Ÿ““ **Obsidian CLI** merged (#211) โ€” knowledge management harness via the Local REST API, with 48 unit tests and 7 E2E tests. โ›“๏ธ **Eth2-Quickstart CLI** merged (#195) โ€” Ethereum staking node management harness. ๐Ÿ“š **Zotero CLI** updated to v0.4.1 (#201) โ€” now shipped from its standalone repo, and CLI-Hub gained support for remote `skill_md` URLs.
-- **2026-04-09** ๐Ÿงน Cleanup and docs pass (#200) โ€” fixed Openscreen test subtotals, added Openscreen to Chinese README and project structure.
+- **2026-04-11** ๐Ÿ”— **n8n CLI** merged (#188) โ€” workflow automation harness for self-hosted automation flows. ๐Ÿ”ง **Exa CLI** fix (#205) added the `x-exa-integration` header for usage tracking. ๐Ÿ“ฆ **CLI-Hub** also gained its PyPI auto-publish workflow and package refresh pipeline.
+
+- **2026-04-10** ๐Ÿ“ฆ **CLI-Hub package manager** launched โ€” `pip install cli-anything-hub` to browse, search, install, update, and uninstall CLI-Anything harnesses from one command. The web Hub also shipped its first install-focused frontend refresh and "Empower yourself" toolkit card.
+
+<details>
+<summary>Earlier news (Apr 1โ€“9)</summary>
+
+- **2026-04-09** ๐Ÿงน Cleanup and docs pass (#200) โ€” fixed Openscreen test subtotals, added Openscreen to the Chinese README and project structure, and clarified `/cli-anything` command syntax in the docs.
- **2026-04-08** ๐ŸŽฌ **Openscreen CLI** merged (#183) โ€” screen recording editor harness with 101 tests. โ˜๏ธ **CloudAnalyzer CLI** merged (#181) โ€” cloud cost analysis harness with 27 commands. ๐ŸŒŠ **SeaClip / PM2 / ChromaDB** harnesses merged (#129).
-- **2026-04-07** ๐Ÿ”„ **Dify Workflow CLI** merged (#191) โ€” workflow automation wrapper. ๐Ÿ”ง **Inkscape** auto-save fix (#193, fixes #182). ๐Ÿ›ก๏ธ **DomShell security hardening** (#156) โ€” URL validation and DOM sanitization for browser CLI. ๐Ÿฅง **Pi Coding Agent extension** merged (#178).
+- **2026-04-07** ๐Ÿ”„ **Dify Workflow CLI** merged (#191) โ€” workflow automation wrapper. ๐Ÿ”ง **Inkscape** auto-save fix (#193, fixes #182). ๐Ÿ›ก๏ธ **DomShell security hardening** (#156) โ€” URL validation and DOM sanitization for the browser CLI. ๐Ÿฅง **Pi Coding Agent extension** merged (#178).
+
+- **2026-04-06** ๐Ÿ” **Exa CLI** merged (#172) โ€” AI-powered web search and answers harness. ๐ŸŽฎ **Godot CLI** merged (#140) โ€” game engine harness with a full demo-game E2E pipeline. โ˜๏ธ **CloudAnalyzer** review fixes and frontend improvements also landed.
-- **2026-04-06** ๐Ÿ” **Exa CLI** merged (#172) โ€” AI-powered web search and answers harness. ๐ŸŽฎ **Godot CLI** merged (#140) โ€” game engine harness with full demo-game E2E pipeline. CLI-Hub frontend improvements.
+- **2026-04-03** ๐Ÿงช **WireMock CLI** merged (#170) โ€” HTTP mock server harness for API testing. ๐Ÿฅง **Pi Coding Agent** extension support also landed, and CLI demo recordings were added to the docs.
-- **2026-04-03** ๐Ÿงช **WireMock CLI** merged (#170) โ€” HTTP mock server harness for API testing. Added CLI demo recordings to documentation.
+- **2026-04-01** โš”๏ธ **Slay the Spire II CLI** merged (#148) โ€” deck-building roguelike harness. ๐ŸŽฅ **VideoCaptioner CLI** merged (#166) โ€” AI-powered video captioning harness. ๐Ÿ›ฐ๏ธ **IntelWatch** was added to the registry for B2B OSINT workflows.
-- **2026-04-01** โš”๏ธ **Slay the Spire II CLI** merged (#148) โ€” game harness for deck-building roguelike. ๐ŸŽฅ **VideoCaptioner CLI** merged (#166) โ€” AI-powered video captioning harness. **IntelWatch** added to registry for B2B OSINT.
+</details>
<details>
<summary>Earlier news (Mar 23โ€“30)</summary>
diff --git a/cli-hub/cli_hub/__init__.py b/cli-hub/cli_hub/__init__.py
index 825d10f0f..7bbe2e5d6 100644
--- a/cli-hub/cli_hub/__init__.py
+++ b/cli-hub/cli_hub/__init__.py
@@ -1,3 +1,3 @@
"""cli-hub โ€” Download, manage, and browse CLI-Anything harnesses."""
-__version__ = "0.1.1"
+__version__ = "0.2.0"
diff --git a/cli-hub/cli_hub/cli.py b/cli-hub/cli_hub/cli.py
index 65557cfa9..720866c0f 100644
--- a/cli-hub/cli_hub/cli.py
+++ b/cli-hub/cli_hub/cli.py
@@ -3,7 +3,7 @@
import click
from cli_hub import __version__
-from cli_hub.registry import fetch_registry, get_cli, search_clis, list_categories
+from cli_hub.registry import fetch_all_clis, get_cli, search_clis, list_categories
from cli_hub.installer import install_cli, uninstall_cli, get_installed, update_cli
from cli_hub.analytics import track_install, track_uninstall, track_visit, track_first_run, _detect_is_agent
@@ -12,7 +12,7 @@ from cli_hub.analytics import track_install, track_uninstall, track_visit, track
@click.option("--version", is_flag=True, help="Show version.")
@click.pass_context
def main(ctx, version):
- """cli-hub โ€” Download and manage CLI-Anything harnesses."""
+ """cli-hub โ€” Download and manage CLI-Anything harnesses and public CLIs."""
track_first_run()
track_visit(is_agent=_detect_is_agent())
if version:
@@ -22,17 +22,29 @@ def main(ctx, version):
click.echo(ctx.get_help())
+def _source_tag(cli):
+ """Return a styled source indicator for display."""
+ source = cli.get("_source", "harness")
+ if source == "public":
+ manager = cli.get("package_manager") or cli.get("install_strategy") or "public"
+ return click.style(f" {manager}", fg="yellow")
+ return ""
+
+
@main.command()
@click.argument("name")
def install(name):
- """Install a CLI harness by name."""
+ """Install a CLI by name."""
click.echo(f"Installing {name}...")
success, msg = install_cli(name)
if success:
cli = get_cli(name)
track_install(name, cli["version"] if cli else "unknown")
click.secho(f"โœ“ {msg}", fg="green")
- click.echo(f" Run it with: {cli['entry_point']}" if cli else "")
+ if cli:
+ click.echo(f" Run it with: {cli['entry_point']}")
+ if cli.get("_source") == "public" and cli.get("npx_cmd"):
+ click.echo(f" Or use npx: {cli['npx_cmd']}")
else:
click.secho(f"โœ— {msg}", fg="red", err=True)
raise SystemExit(1)
@@ -41,7 +53,7 @@ def install(name):
@main.command()
@click.argument("name")
def uninstall(name):
- """Uninstall a CLI harness by name."""
+ """Uninstall a CLI by name."""
success, msg = uninstall_cli(name)
if success:
track_uninstall(name)
@@ -54,7 +66,7 @@ def uninstall(name):
@main.command()
@click.argument("name")
def update(name):
- """Update a CLI harness to the latest version."""
+ """Update a CLI to the latest version."""
click.echo(f"Updating {name}...")
success, msg = update_cli(name)
if success:
@@ -68,24 +80,30 @@ def update(name):
@main.command("list")
@click.option("--category", "-c", default=None, help="Filter by category.")
[email protected]("--source", "-s", default=None, type=click.Choice(["harness", "public", "npm", "all"], case_sensitive=False),
+ help="Filter by source (harness, public, or all). 'npm' is kept as an alias for public.")
@click.option("--json", "as_json", is_flag=True, help="Output as JSON.")
-def list_clis(category, as_json):
- """List all available CLI harnesses."""
+def list_clis(category, source, as_json):
+ """List all available CLIs."""
try:
- registry = fetch_registry()
+ all_clis = fetch_all_clis()
except Exception as e:
click.secho(f"Failed to fetch registry: {e}", fg="red", err=True)
raise SystemExit(1)
- clis = registry["clis"]
+ clis = all_clis
if category:
clis = [c for c in clis if c.get("category", "").lower() == category.lower()]
+ if source == "npm":
+ source = "public"
+ if source and source != "all":
+ clis = [c for c in clis if c.get("_source", "harness") == source]
installed = get_installed()
if as_json:
- import json
- click.echo(json.dumps(clis, indent=2))
+ import json as json_mod
+ click.echo(json_mod.dumps(clis, indent=2))
return
if not clis:
@@ -103,13 +121,16 @@ def list_clis(category, as_json):
for cli in sorted(by_cat[cat], key=lambda c: c["name"]):
marker = click.style(" โ—", fg="green") if cli["name"] in installed else " "
name = click.style(f"{cli['name']:20s}", bold=True)
- desc = cli["description"][:60]
- click.echo(f" {marker} {name} {desc}")
+ desc = cli["description"][:55]
+ tag = _source_tag(cli)
+ click.echo(f" {marker} {name}{tag} {desc}")
total = len(clis)
inst = sum(1 for c in clis if c["name"] in installed)
- click.echo(f"\n {total} CLIs available, {inst} installed")
- cats = list_categories(registry)
+ harness_count = sum(1 for c in clis if c.get("_source") == "harness")
+ public_count = sum(1 for c in clis if c.get("_source") == "public")
+ click.echo(f"\n {total} CLIs available ({harness_count} harness, {public_count} public), {inst} installed")
+ cats = list_categories()
click.echo(f" Categories: {', '.join(cats)}")
@@ -121,8 +142,8 @@ def search(query, as_json):
results = search_clis(query)
if as_json:
- import json
- click.echo(json.dumps(results, indent=2))
+ import json as json_mod
+ click.echo(json_mod.dumps(results, indent=2))
return
if not results:
@@ -134,7 +155,8 @@ def search(query, as_json):
marker = click.style("โ—", fg="green") if cli["name"] in installed else " "
name = click.style(cli["name"], bold=True)
cat = click.style(f"[{cli.get('category', '')}]", fg="blue")
- click.echo(f" {marker} {name} {cat} โ€” {cli['description'][:70]}")
+ tag = _source_tag(cli)
+ click.echo(f" {marker} {name} {cat}{tag} โ€” {cli['description'][:65]}")
click.echo(f" Install: cli-hub install {cli['name']}")
@@ -149,15 +171,30 @@ def info(name):
installed = get_installed()
is_installed = cli["name"] in installed
+ source = cli.get("_source", "harness")
click.secho(f"\n {cli['display_name']}", bold=True)
click.echo(f" {cli['description']}")
click.echo(f" Category: {cli.get('category', 'N/A')}")
+ click.echo(f" Source: {source}")
+ if source == "public":
+ click.echo(f" Install via: {cli.get('package_manager') or cli.get('install_strategy') or 'public'}")
+ if cli.get("npm_package"):
+ click.echo(f" npm package: {cli['npm_package']}")
+ if cli.get("npx_cmd"):
+ click.echo(f" npx command: {cli['npx_cmd']}")
+ if cli.get("install_cmd"):
+ click.echo(f" Install cmd: {cli['install_cmd']}")
+ if cli.get("install_notes"):
+ click.echo(f" Notes: {cli['install_notes']}")
click.echo(f" Version: {cli['version']}")
click.echo(f" Requires: {cli.get('requires') or 'nothing'}")
click.echo(f" Entry point: {cli['entry_point']}")
click.echo(f" Homepage: {cli.get('homepage', 'N/A')}")
- click.echo(f" Contributor: {cli.get('contributor', 'N/A')}")
+ contributors = cli.get("contributors", [])
+ if contributors:
+ names = ", ".join(ct["name"] for ct in contributors)
+ click.echo(f" Contributors: {names}")
status = click.style("installed", fg="green") if is_installed else "not installed"
click.echo(f" Status: {status}")
click.echo(f"\n Install: cli-hub install {cli['name']}")
diff --git a/cli-hub/cli_hub/installer.py b/cli-hub/cli_hub/installer.py
index a8f761fcd..c6d68860e 100644
--- a/cli-hub/cli_hub/installer.py
+++ b/cli-hub/cli_hub/installer.py
@@ -1,11 +1,13 @@
-"""Install, uninstall, and manage CLI-Anything harnesses via pip."""
+"""Install, uninstall, and manage CLIs โ€” dispatches to pip or npm based on source."""
import json
+import shlex
+import shutil
import subprocess
import sys
from pathlib import Path
-from cli_hub.registry import get_cli, fetch_registry
+from cli_hub.registry import get_cli
INSTALLED_FILE = Path.home() / ".cli-hub" / "installed.json"
@@ -24,84 +26,284 @@ def _save_installed(data):
INSTALLED_FILE.write_text(json.dumps(data, indent=2))
-def install_cli(name):
- """Install a CLI harness by name. Returns (success, message)."""
- cli = get_cli(name)
- if cli is None:
- return False, f"CLI '{name}' not found in registry. Use 'cli-hub list' to see available CLIs."
+def _find_npm():
+ """Find npm executable. Returns path or None."""
+ return shutil.which("npm")
+
+
+def _run_command(cmd):
+ """Run a command string without invoking a shell."""
+ try:
+ return subprocess.run(
+ shlex.split(cmd),
+ capture_output=True,
+ text=True,
+ )
+ except FileNotFoundError as exc:
+ missing = exc.filename or shlex.split(cmd)[0]
+ return subprocess.CompletedProcess(
+ args=cmd,
+ returncode=127,
+ stdout="",
+ stderr=f"Command not found: {missing}",
+ )
+
+
+def _command_exists(cmd):
+ """Check whether the executable for a command string exists on PATH."""
+ try:
+ parts = shlex.split(cmd)
+ except ValueError:
+ return False
+ if not parts:
+ return False
+ return shutil.which(parts[0]) is not None
+
+
+def _install_strategy(cli):
+ """Return the install strategy for a CLI entry."""
+ strategy = cli.get("install_strategy")
+ if strategy:
+ return strategy
+ if cli.get("_source", "harness") == "harness":
+ return "pip"
+ if cli.get("npm_package") or cli.get("package_manager") == "npm":
+ return "npm"
+ if cli.get("package_manager") == "bundled":
+ return "bundled"
+ return "command"
+
+
+def _generic_install(cli):
+ install_cmd = cli.get("install_cmd")
+ if not install_cmd:
+ return False, f"No install command is defined for {cli['display_name']}."
+ result = _run_command(install_cmd)
+ if result.returncode == 0:
+ return True, f"Installed {cli['display_name']} ({cli['entry_point']})"
+ return False, f"Install failed:\n{result.stderr or result.stdout}"
+
+
+def _generic_uninstall(cli):
+ uninstall_cmd = cli.get("uninstall_cmd")
+ if not uninstall_cmd:
+ note = cli.get("uninstall_notes") or f"No uninstall command is defined for {cli['display_name']}."
+ return False, note
+ result = _run_command(uninstall_cmd)
+ if result.returncode == 0:
+ return True, f"Uninstalled {cli['display_name']}"
+ return False, f"Uninstall failed:\n{result.stderr or result.stdout}"
+
+
+def _generic_update(cli):
+ update_cmd = cli.get("update_cmd")
+ if not update_cmd:
+ note = cli.get("update_notes") or f"No update command is defined for {cli['display_name']}."
+ return False, note
+ result = _run_command(update_cmd)
+ if result.returncode == 0:
+ return True, f"Updated {cli['display_name']}"
+ return False, f"Update failed:\n{result.stderr or result.stdout}"
+
+
+def _bundled_install(cli):
+ detect_cmd = cli.get("detect_cmd") or cli.get("entry_point")
+ if detect_cmd and _command_exists(detect_cmd):
+ return True, f"{cli['display_name']} is already available ({cli['entry_point']})"
+ note = cli.get("install_notes") or (
+ f"{cli['display_name']} is bundled with its parent app. "
+ "Install or enable it in the upstream app first, then run this command again."
+ )
+ return False, note
+
+
+def _bundled_uninstall(cli):
+ note = cli.get("uninstall_notes") or (
+ f"{cli['display_name']} is bundled with its parent app. "
+ "Disable it in the upstream app or uninstall the parent app manually."
+ )
+ return False, note
+
+
+def _bundled_update(cli):
+ note = cli.get("update_notes") or (
+ f"{cli['display_name']} is bundled with its parent app. "
+ "Update the parent app to update this CLI."
+ )
+ return False, note
+
+
+# โ”€โ”€ pip operations (harness CLIs) โ”€โ”€
+
+def _pip_install(cli):
install_cmd = cli["install_cmd"]
result = subprocess.run(
[sys.executable, "-m", "pip", "install"] + install_cmd.replace("pip install ", "").split(),
capture_output=True, text=True
)
+ if result.returncode == 0:
+ return True, f"Installed {cli['display_name']} ({cli['entry_point']})"
+ return False, f"pip install failed:\n{result.stderr}"
+
+
+def _pip_uninstall(cli):
+ pkg_name = f"cli-anything-{cli['name']}"
+ result = subprocess.run(
+ [sys.executable, "-m", "pip", "uninstall", "-y", pkg_name],
+ capture_output=True, text=True
+ )
+ if result.returncode == 0:
+ return True, f"Uninstalled {cli['display_name']}"
+ return False, f"pip uninstall failed:\n{result.stderr}"
+
+
+def _pip_update(cli):
+ install_cmd = cli["install_cmd"]
+ result = subprocess.run(
+ [sys.executable, "-m", "pip", "install", "--upgrade", "--force-reinstall"]
+ + install_cmd.replace("pip install ", "").split(),
+ capture_output=True, text=True
+ )
+ if result.returncode == 0:
+ return True, f"Updated {cli['display_name']} to {cli['version']}"
+ return False, f"Update failed:\n{result.stderr}"
+
+
+# โ”€โ”€ npm operations (public CLIs) โ”€โ”€
+
+
+def _npm_install(cli):
+ npm = _find_npm()
+ if npm is None:
+ return False, (
+ "npm is not installed. Install Node.js first:\n"
+ " macOS: brew install node\n"
+ " Linux: curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - && sudo apt-get install -y nodejs\n"
+ " Windows: Download from https://nodejs.org"
+ )
+ result = subprocess.run(
+ [npm, "install", "-g", cli["npm_package"]],
+ capture_output=True, text=True
+ )
+ if result.returncode == 0:
+ return True, f"Installed {cli['display_name']} ({cli['entry_point']})"
+ return False, f"npm install failed:\n{result.stderr}"
+
+def _npm_uninstall(cli):
+ npm = _find_npm()
+ if npm is None:
+ return False, "npm is not installed."
+ result = subprocess.run(
+ [npm, "uninstall", "-g", cli["npm_package"]],
+ capture_output=True, text=True
+ )
if result.returncode == 0:
+ return True, f"Uninstalled {cli['display_name']}"
+ return False, f"npm uninstall failed:\n{result.stderr}"
+
+
+def _npm_update(cli):
+ npm = _find_npm()
+ if npm is None:
+ return False, "npm is not installed."
+ result = subprocess.run(
+ [npm, "install", "-g", cli["npm_package"] + "@latest"],
+ capture_output=True, text=True
+ )
+ if result.returncode == 0:
+ return True, f"Updated {cli['display_name']} to latest"
+ return False, f"Update failed:\n{result.stderr}"
+
+
+def _perform_action(cli, action):
+ """Dispatch install/uninstall/update based on CLI strategy."""
+ strategy = _install_strategy(cli)
+ actions = {
+ "pip": {"install": _pip_install, "uninstall": _pip_uninstall, "update": _pip_update},
+ "npm": {"install": _npm_install, "uninstall": _npm_uninstall, "update": _npm_update},
+ "command": {"install": _generic_install, "uninstall": _generic_uninstall, "update": _generic_update},
+ "bundled": {"install": _bundled_install, "uninstall": _bundled_uninstall, "update": _bundled_update},
+ }
+ handler = actions.get(strategy, actions["command"]).get(action)
+ return strategy, handler(cli)
+
+
+def _installed_entry(cli, source, strategy):
+ """Return the installed.json payload for a CLI."""
+ entry = {
+ "version": cli["version"],
+ "entry_point": cli["entry_point"],
+ "source": source,
+ "strategy": strategy,
+ }
+ if cli.get("package_manager"):
+ entry["package_manager"] = cli["package_manager"]
+ if cli.get("npm_package"):
+ entry["npm_package"] = cli["npm_package"]
+ if cli.get("install_cmd"):
+ entry["install_cmd"] = cli["install_cmd"]
+ if cli.get("uninstall_cmd"):
+ entry["uninstall_cmd"] = cli["uninstall_cmd"]
+ if cli.get("update_cmd"):
+ entry["update_cmd"] = cli["update_cmd"]
+ return entry
+
+
+# โ”€โ”€ Unified interface โ”€โ”€
+
+
+def install_cli(name):
+ """Install a CLI by name. Dispatches to pip or npm based on source. Returns (success, message)."""
+ cli = get_cli(name)
+ if cli is None:
+ return False, f"CLI '{name}' not found in registry. Use 'cli-hub list' to see available CLIs."
+
+ source = cli.get("_source", "harness")
+ strategy, (success, msg) = _perform_action(cli, "install")
+
+ if success:
installed = _load_installed()
- installed[cli["name"]] = {
- "version": cli["version"],
- "entry_point": cli["entry_point"],
- "install_cmd": install_cmd,
- }
+ installed[cli["name"]] = _installed_entry(cli, source, strategy)
_save_installed(installed)
- return True, f"Installed {cli['display_name']} ({cli['entry_point']})"
- else:
- return False, f"pip install failed:\n{result.stderr}"
+
+ return success, msg
def uninstall_cli(name):
- """Uninstall a CLI harness by name. Returns (success, message)."""
+ """Uninstall a CLI by name. Returns (success, message)."""
cli = get_cli(name)
if cli is None:
return False, f"CLI '{name}' not found in registry."
- # The pip package name follows the pattern: cli-anything-<name> with underscores
- # but we derive it from the install_cmd's subdirectory
- # The namespace package is cli_anything.<name>, entry point is cli-anything-<name>
- # pip package name in subdirectory installs is the name from setup.py
- # We'll uninstall by the entry_point pattern
- pkg_name = f"cli-anything-{cli['name']}"
+ _, (success, msg) = _perform_action(cli, "uninstall")
- result = subprocess.run(
- [sys.executable, "-m", "pip", "uninstall", "-y", pkg_name],
- capture_output=True, text=True
- )
-
- if result.returncode == 0:
+ if success:
installed = _load_installed()
installed.pop(cli["name"], None)
_save_installed(installed)
- return True, f"Uninstalled {cli['display_name']}"
- else:
- return False, f"pip uninstall failed:\n{result.stderr}"
-
-def get_installed():
- """Return dict of installed CLIs."""
- return _load_installed()
+ return success, msg
def update_cli(name):
- """Update a CLI by reinstalling from the latest source."""
- cli = get_cli(name, fetch_registry(force_refresh=True))
+ """Update a CLI by reinstalling. Returns (success, message)."""
+ cli = get_cli(name, force_refresh=True)
if cli is None:
return False, f"CLI '{name}' not found in registry."
- install_cmd = cli["install_cmd"]
- result = subprocess.run(
- [sys.executable, "-m", "pip", "install", "--upgrade", "--force-reinstall"]
- + install_cmd.replace("pip install ", "").split(),
- capture_output=True, text=True
- )
+ source = cli.get("_source", "harness")
+ strategy, (success, msg) = _perform_action(cli, "update")
- if result.returncode == 0:
+ if success:
installed = _load_installed()
- installed[cli["name"]] = {
- "version": cli["version"],
- "entry_point": cli["entry_point"],
- "install_cmd": install_cmd,
- }
+ installed[cli["name"]] = _installed_entry(cli, source, strategy)
_save_installed(installed)
- return True, f"Updated {cli['display_name']} to {cli['version']}"
- else:
- return False, f"Update failed:\n{result.stderr}"
+
+ return success, msg
+
+
+def get_installed():
+ """Return dict of installed CLIs."""
+ return _load_installed()
diff --git a/cli-hub/cli_hub/registry.py b/cli-hub/cli_hub/registry.py
index 8b6a3b99c..ce194b24a 100644
--- a/cli-hub/cli_hub/registry.py
+++ b/cli-hub/cli_hub/registry.py
@@ -1,15 +1,16 @@
-"""Fetch and cache the CLI-Anything registry."""
+"""Fetch, cache, and merge the CLI-Anything registries (harness + public)."""
import json
-import os
import time
from pathlib import Path
import requests
REGISTRY_URL = "https://hkuds.github.io/CLI-Anything/registry.json"
+PUBLIC_REGISTRY_URL = "https://hkuds.github.io/CLI-Anything/public_registry.json"
CACHE_DIR = Path.home() / ".cli-hub"
CACHE_FILE = CACHE_DIR / "registry_cache.json"
+PUBLIC_CACHE_FILE = CACHE_DIR / "public_registry_cache.json"
CACHE_TTL = 3600 # 1 hour
@@ -17,46 +18,90 @@ def _ensure_cache_dir():
CACHE_DIR.mkdir(parents=True, exist_ok=True)
-def fetch_registry(force_refresh=False):
- """Fetch registry.json, using a local cache with TTL."""
+def _load_cached_data(cache_file):
+ """Return cached registry data if the cache file is valid."""
+ if not cache_file.exists():
+ return None
+ try:
+ cached = json.loads(cache_file.read_text())
+ return cached["data"]
+ except (json.JSONDecodeError, KeyError):
+ return None
+
+
+def _fetch_json(url, cache_file, force_refresh=False):
+ """Fetch a JSON URL with local file caching."""
_ensure_cache_dir()
- if not force_refresh and CACHE_FILE.exists():
+ if not force_refresh and cache_file.exists():
try:
- cached = json.loads(CACHE_FILE.read_text())
+ cached = json.loads(cache_file.read_text())
if time.time() - cached.get("_cached_at", 0) < CACHE_TTL:
return cached["data"]
except (json.JSONDecodeError, KeyError):
pass
- resp = requests.get(REGISTRY_URL, timeout=15)
- resp.raise_for_status()
- data = resp.json()
+ try:
+ resp = requests.get(url, timeout=15)
+ resp.raise_for_status()
+ data = resp.json()
+ except (requests.RequestException, ValueError):
+ cached_data = _load_cached_data(cache_file)
+ if cached_data is not None:
+ return cached_data
+ raise
cache_payload = {"_cached_at": time.time(), "data": data}
- CACHE_FILE.write_text(json.dumps(cache_payload, indent=2))
+ cache_file.write_text(json.dumps(cache_payload, indent=2))
return data
-def get_cli(name, registry=None):
- """Look up a CLI entry by name (case-insensitive)."""
- if registry is None:
- registry = fetch_registry()
- name_lower = name.lower()
+def fetch_registry(force_refresh=False):
+ """Fetch the harness registry.json."""
+ return _fetch_json(REGISTRY_URL, CACHE_FILE, force_refresh)
+
+
+def fetch_public_registry(force_refresh=False):
+ """Fetch the public CLI registry. Returns None on failure."""
+ try:
+ return _fetch_json(PUBLIC_REGISTRY_URL, PUBLIC_CACHE_FILE, force_refresh)
+ except Exception:
+ return None
+
+
+def fetch_all_clis(force_refresh=False):
+ """Fetch and merge both registries. Each CLI is tagged with _source."""
+ registry = fetch_registry(force_refresh)
+ all_clis = []
+
for cli in registry["clis"]:
+ cli["_source"] = "harness"
+ all_clis.append(cli)
+
+ public = fetch_public_registry(force_refresh)
+ if public:
+ for cli in public["clis"]:
+ cli["_source"] = "public"
+ all_clis.append(cli)
+
+ return all_clis
+
+
+def get_cli(name, force_refresh=False):
+ """Look up a CLI entry by name (case-insensitive) across both registries."""
+ name_lower = name.lower()
+ for cli in fetch_all_clis(force_refresh):
if cli["name"].lower() == name_lower:
return cli
return None
-def search_clis(query, registry=None):
- """Search CLIs by name, description, or category."""
- if registry is None:
- registry = fetch_registry()
+def search_clis(query, force_refresh=False):
+ """Search CLIs by name, description, or category across both registries."""
query_lower = query.lower()
results = []
- for cli in registry["clis"]:
+ for cli in fetch_all_clis(force_refresh):
if (query_lower in cli["name"].lower()
or query_lower in cli["description"].lower()
or query_lower in cli.get("category", "").lower()
@@ -65,8 +110,6 @@ def search_clis(query, registry=None):
return results
-def list_categories(registry=None):
- """Return sorted list of unique categories."""
- if registry is None:
- registry = fetch_registry()
- return sorted(set(cli.get("category", "uncategorized") for cli in registry["clis"]))
+def list_categories(force_refresh=False):
+ """Return sorted list of unique categories across both registries."""
+ return sorted(set(cli.get("category", "uncategorized") for cli in fetch_all_clis(force_refresh)))
diff --git a/cli-hub/setup.py b/cli-hub/setup.py
index ad2c5b44b..b2810332a 100644
--- a/cli-hub/setup.py
+++ b/cli-hub/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
setup(
name="cli-anything-hub",
- version="0.1.1",
+ version="0.2.0",
description="Package manager for CLI-Anything โ€” browse, install, and manage 40+ agent-native CLI interfaces for GUI applications",
long_description=open("README.md").read(),
long_description_content_type="text/markdown",
diff --git a/cli-hub/tests/test_cli_hub.py b/cli-hub/tests/test_cli_hub.py
index 37f85deaf..509b8f3e0 100644
--- a/cli-hub/tests/test_cli_hub.py
+++ b/cli-hub/tests/test_cli_hub.py
@@ -8,9 +8,10 @@ from unittest.mock import patch, MagicMock
import pytest
import click.testing
+import requests
from cli_hub import __version__
-from cli_hub.registry import fetch_registry, get_cli, search_clis, list_categories
+from cli_hub.registry import fetch_registry, fetch_all_clis, get_cli, search_clis, list_categories
from cli_hub.installer import install_cli, uninstall_cli, get_installed, _load_installed, _save_installed
from cli_hub.analytics import _is_enabled, track_event, track_install, track_uninstall as analytics_track_uninstall, track_visit, track_first_run, _detect_is_agent
from cli_hub.cli import main
@@ -85,41 +86,61 @@ class TestRegistry:
assert result["clis"][0]["name"] == "gimp"
mock_get.assert_called_once()
- def test_get_cli_found(self):
- cli = get_cli("gimp", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.requests.get", side_effect=requests.ConnectionError("network down"))
+ def test_fetch_registry_uses_cache_on_refresh_failure(self, mock_get, tmp_path):
+ cache_file = tmp_path / "registry_cache.json"
+ cache_payload = {"_cached_at": 0, "data": SAMPLE_REGISTRY}
+ cache_file.write_text(json.dumps(cache_payload, indent=2))
+
+ with patch("cli_hub.registry.CACHE_FILE", cache_file):
+ result = fetch_registry(force_refresh=True)
+
+ assert result["clis"][0]["name"] == "gimp"
+ mock_get.assert_called_once()
+
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_get_cli_found(self, mock_fetch):
+ cli = get_cli("gimp")
assert cli is not None
assert cli["display_name"] == "GIMP"
- def test_get_cli_case_insensitive(self):
- cli = get_cli("GIMP", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_get_cli_case_insensitive(self, mock_fetch):
+ cli = get_cli("GIMP")
assert cli is not None
assert cli["name"] == "gimp"
- def test_get_cli_not_found(self):
- cli = get_cli("nonexistent", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_get_cli_not_found(self, mock_fetch):
+ cli = get_cli("nonexistent")
assert cli is None
- def test_search_by_name(self):
- results = search_clis("gimp", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_search_by_name(self, mock_fetch):
+ results = search_clis("gimp")
assert len(results) == 1
assert results[0]["name"] == "gimp"
- def test_search_by_category(self):
- results = search_clis("3d", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_search_by_category(self, mock_fetch):
+ results = search_clis("3d")
assert len(results) == 1
assert results[0]["name"] == "blender"
- def test_search_by_description(self):
- results = search_clis("audio", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_search_by_description(self, mock_fetch):
+ results = search_clis("audio")
assert len(results) == 1
assert results[0]["name"] == "audacity"
- def test_search_no_results(self):
- results = search_clis("nonexistent_xyz", SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_search_no_results(self, mock_fetch):
+ results = search_clis("nonexistent_xyz")
assert len(results) == 0
- def test_list_categories(self):
- cats = list_categories(SAMPLE_REGISTRY)
+ @patch("cli_hub.registry.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ def test_list_categories(self, mock_fetch):
+ cats = list_categories()
assert cats == ["3d", "audio", "image"]
@@ -180,6 +201,66 @@ class TestInstaller:
assert success
assert "GIMP" in msg
+ @patch("cli_hub.installer.subprocess.run")
+ @patch("cli_hub.installer.get_cli")
+ @patch("cli_hub.installer.INSTALLED_FILE", Path(tempfile.mktemp()))
+ def test_install_command_strategy_success(self, mock_get_cli, mock_run):
+ mock_get_cli.return_value = {
+ "name": "onepassword-cli",
+ "display_name": "1Password CLI",
+ "version": "latest",
+ "description": "Secrets automation",
+ "entry_point": "op",
+ "_source": "public",
+ "install_strategy": "command",
+ "package_manager": "brew",
+ "install_cmd": "brew install --cask 1password-cli",
+ }
+ mock_run.return_value = MagicMock(returncode=0, stderr="", stdout="")
+
+ success, msg = install_cli("onepassword-cli")
+ assert success
+ assert "1Password CLI" in msg
+
+ @patch("cli_hub.installer.subprocess.run", side_effect=FileNotFoundError(2, "No such file or directory", "brew"))
+ @patch("cli_hub.installer.get_cli")
+ @patch("cli_hub.installer.INSTALLED_FILE", Path(tempfile.mktemp()))
+ def test_install_command_strategy_missing_executable(self, mock_get_cli, mock_run):
+ mock_get_cli.return_value = {
+ "name": "onepassword-cli",
+ "display_name": "1Password CLI",
+ "version": "latest",
+ "description": "Secrets automation",
+ "entry_point": "op",
+ "_source": "public",
+ "install_strategy": "command",
+ "package_manager": "brew",
+ "install_cmd": "brew install --cask 1password-cli",
+ }
+
+ success, msg = install_cli("onepassword-cli")
+ assert not success
+ assert "Command not found: brew" in msg
+
+ @patch("cli_hub.installer.shutil.which", return_value="/usr/local/bin/obsidian")
+ @patch("cli_hub.installer.get_cli")
+ @patch("cli_hub.installer.INSTALLED_FILE", Path(tempfile.mktemp()))
+ def test_install_bundled_strategy_success_when_detected(self, mock_get_cli, mock_which):
+ mock_get_cli.return_value = {
+ "name": "obsidian-cli",
+ "display_name": "Obsidian CLI",
+ "version": "bundled",
+ "description": "Bundled inside Obsidian",
+ "entry_point": "obsidian",
+ "_source": "public",
+ "install_strategy": "bundled",
+ "package_manager": "bundled",
+ }
+
+ success, msg = install_cli("obsidian-cli")
+ assert success
+ assert "already available" in msg
+
# โ”€โ”€โ”€ Analytics tests โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
@@ -342,9 +423,10 @@ class TestCLI:
@patch("cli_hub.cli.track_first_run")
@patch("cli_hub.cli.track_visit")
@patch("cli_hub.cli._detect_is_agent", return_value=False)
- @patch("cli_hub.cli.fetch_registry", return_value=SAMPLE_REGISTRY)
+ @patch("cli_hub.cli.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ @patch("cli_hub.cli.list_categories", return_value=["3d", "audio", "image"])
@patch("cli_hub.cli.get_installed", return_value={})
- def test_list_command(self, mock_installed, mock_fetch, mock_detect, mock_visit, mock_first_run):
+ def test_list_command(self, mock_installed, mock_categories, mock_fetch, mock_detect, mock_visit, mock_first_run):
result = self.runner.invoke(main, ["list"])
assert "gimp" in result.output
assert "blender" in result.output
@@ -353,9 +435,10 @@ class TestCLI:
@patch("cli_hub.cli.track_first_run")
@patch("cli_hub.cli.track_visit")
@patch("cli_hub.cli._detect_is_agent", return_value=False)
- @patch("cli_hub.cli.fetch_registry", return_value=SAMPLE_REGISTRY)
+ @patch("cli_hub.cli.fetch_all_clis", return_value=SAMPLE_REGISTRY["clis"])
+ @patch("cli_hub.cli.list_categories", return_value=["3d", "audio", "image"])
@patch("cli_hub.cli.get_installed", return_value={})
- def test_list_with_category(self, mock_installed, mock_fetch, mock_detect, mock_visit, mock_first_run):
+ def test_list_with_category(self, mock_installed, mock_categories, mock_fetch, mock_detect, mock_visit, mock_first_run):
result = self.runner.invoke(main, ["list", "-c", "image"])
assert "gimp" in result.output
assert "blender" not in result.output
diff --git a/docs/hub/index.html b/docs/hub/index.html
index c81ffd3a4..e2f94d51d 100644
--- a/docs/hub/index.html
+++ b/docs/hub/index.html
@@ -400,13 +400,200 @@
border-top: 1px solid var(--border-subtle);
}
- /* โ”€โ”€ Controls โ”€โ”€ */
- .controls {
- max-width: 1120px;
+ /* โ”€โ”€ Deck system โ”€โ”€ */
+ .deck-stage {
+ --deck-peek: 72px;
+ max-width: 1200px;
margin: 0 auto;
- padding: 1.5rem 1.5rem 0;
+ position: relative;
+ }
+
+ .deck-viewport {
+ --deck-panel-width: calc(100% - var(--deck-peek));
+ width: calc(100% + var(--deck-peek));
+ margin-right: calc(var(--deck-peek) * -1);
+ position: relative;
+ overflow: hidden;
+ isolation: isolate;
+ }
+
+ .deck-track {
display: flex;
+ width: max-content;
+ transition: transform 0.55s cubic-bezier(0.4, 0, 0.15, 1);
+ will-change: transform;
+ }
+
+ .deck-panel {
+ position: relative;
+ width: var(--deck-panel-width);
+ min-width: var(--deck-panel-width);
+ flex-shrink: 0;
+ }
+
+ .deck-panel--public {
+ box-shadow: inset 1px 0 0 rgba(161, 161, 170, 0.55);
+ }
+
+ .deck-panel::before {
+ content: '';
+ position: absolute;
+ inset: 0;
+ opacity: 0;
+ pointer-events: none;
+ transition: opacity 0.28s ease;
+ z-index: 2;
+ }
+
+ .deck-track[data-active="harness"] .deck-panel--public::before {
+ background: linear-gradient(90deg, rgba(9, 9, 11, 0.4) 0%, rgba(9, 9, 11, 0.2) 48%, rgba(9, 9, 11, 0.05) 100%);
+ opacity: 1;
+ }
+
+ .deck-track[data-active="public"] .deck-panel--harness::before {
+ background: linear-gradient(270deg, rgba(9, 9, 11, 0.4) 0%, rgba(9, 9, 11, 0.2) 48%, rgba(9, 9, 11, 0.05) 100%);
+ opacity: 1;
+ }
+
+ [data-theme="light"] .deck-track[data-active="harness"] .deck-panel--public::before {
+ background: linear-gradient(90deg, rgba(250, 250, 250, 0.56) 0%, rgba(250, 250, 250, 0.28) 48%, rgba(250, 250, 250, 0.06) 100%);
+ }
+
+ [data-theme="light"] .deck-track[data-active="public"] .deck-panel--harness::before {
+ background: linear-gradient(270deg, rgba(250, 250, 250, 0.56) 0%, rgba(250, 250, 250, 0.28) 48%, rgba(250, 250, 250, 0.06) 100%);
+ }
+
+ /* โ”€โ”€ Deck nav strip โ”€โ”€ */
+ .deck-nav {
+ max-width: 1200px;
+ margin: 0 auto;
+ padding: 1.25rem 1.5rem 0;
+ display: flex;
+ align-items: center;
+ gap: 0;
+ }
+
+ .deck-tab {
+ position: relative;
+ padding: 0.6rem 1.25rem;
+ background: none;
+ border: none;
+ color: var(--text-tertiary);
+ font-size: 0.85rem;
+ font-family: 'Inter', sans-serif;
+ font-weight: 500;
+ cursor: pointer;
+ transition: color 0.2s;
+ display: flex;
+ align-items: center;
gap: 0.5rem;
+ }
+
+ .deck-tab::after {
+ content: '';
+ position: absolute;
+ bottom: 0; left: 1.25rem; right: 1.25rem;
+ height: 2px;
+ background: transparent;
+ border-radius: 1px;
+ transition: background 0.2s;
+ }
+
+ .deck-tab:hover { color: var(--text-secondary); }
+
+ .deck-tab.active {
+ color: var(--text);
+ font-weight: 600;
+ }
+
+ .deck-tab.active::after {
+ background: var(--accent);
+ }
+
+ .deck-tab.active.deck-tab--public::after {
+ background: var(--orange);
+ }
+
+ .deck-tab .deck-count {
+ font-size: 0.7rem;
+ font-weight: 600;
+ padding: 0.1rem 0.45rem;
+ border-radius: 999px;
+ background: var(--surface-raised);
+ color: var(--text-tertiary);
+ transition: all 0.2s;
+ }
+
+ .deck-tab.active .deck-count {
+ background: rgba(59, 130, 246, 0.12);
+ color: var(--accent);
+ }
+
+ .deck-tab.active.deck-tab--public .deck-count {
+ background: rgba(234, 138, 46, 0.12);
+ color: var(--orange);
+ }
+
+ .deck-separator {
+ flex: 1;
+ height: 1px;
+ background: var(--border-subtle);
+ margin: 0 0.5rem;
+ }
+
+ .deck-arrow-btn {
+ display: inline-flex;
+ align-items: center;
+ gap: 0.35rem;
+ padding: 0.4rem 0.85rem;
+ background: none;
+ border: 1px solid var(--border);
+ border-radius: 999px;
+ color: var(--text-tertiary);
+ font-size: 0.75rem;
+ font-family: 'Inter', sans-serif;
+ font-weight: 500;
+ cursor: pointer;
+ transition: all 0.2s;
+ }
+
+ .deck-arrow-btn:hover {
+ border-color: var(--text-tertiary);
+ color: var(--text-secondary);
+ background: var(--surface);
+ }
+
+ .deck-arrow-btn svg {
+ width: 14px;
+ height: 14px;
+ transition: transform 0.2s;
+ }
+
+ .deck-arrow-btn:hover svg {
+ transform: translateX(2px);
+ }
+
+ .deck-arrow-btn--back:hover svg {
+ transform: translateX(-2px);
+ }
+
+ /* โ”€โ”€ Public deck accent โ”€โ”€ */
+ :root {
+ --orange: #ea8a2e;
+ --orange-muted: rgba(234, 138, 46, 0.12);
+ }
+
+ [data-theme="light"] {
+ --orange: #c2711e;
+ --orange-muted: rgba(194, 113, 30, 0.1);
+ }
+
+ /* โ”€โ”€ Controls โ”€โ”€ */
+ .controls {
+ margin: 0;
+ padding: 1.15rem 1.5rem 0;
+ display: flex;
+ gap: 0.7rem;
flex-wrap: wrap;
align-items: center;
}
@@ -414,12 +601,12 @@
.search {
flex: 1;
min-width: 200px;
- padding: 0.55rem 0.85rem;
+ padding: 0.72rem 0.95rem;
background: var(--surface);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text);
- font-size: 0.85rem;
+ font-size: 0.9rem;
font-family: 'Inter', sans-serif;
outline: none;
transition: border-color 0.15s;
@@ -429,12 +616,13 @@
.search:focus { border-color: var(--text-tertiary); }
.sort-select {
- padding: 0.55rem 2.2rem 0.55rem 0.85rem;
+ min-width: 168px;
+ padding: 0.72rem 2.4rem 0.72rem 0.95rem;
background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%2371717a" d="M6 9L2 5h8z"/></svg>') no-repeat right 0.65rem center;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text);
- font-size: 0.85rem;
+ font-size: 0.9rem;
font-family: 'Inter', sans-serif;
outline: none;
cursor: pointer;
@@ -451,24 +639,33 @@
.filter-row {
display: flex;
- gap: 0.35rem;
+ gap: 0.45rem;
+ row-gap: 0.55rem;
flex-wrap: wrap;
- max-width: 1120px;
- margin: 0 auto;
- padding: 0.75rem 1.5rem 0;
+ margin: 0;
+ padding: 0.85rem 1.5rem 0;
+ }
+
+ .deck-panel--harness .filter-row {
+ margin-right: calc(var(--deck-peek) * 0.58);
+ padding-right: 1.5rem;
}
+ .filter-row::-webkit-scrollbar { display: none; }
+
.filter-btn {
padding: 0.3rem 0.7rem;
background: transparent;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--text-tertiary);
- font-size: 0.78rem;
+ font-size: 0.8rem;
font-family: 'Inter', sans-serif;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
+ white-space: nowrap;
+ flex-shrink: 0;
}
.filter-btn:hover { border-color: var(--text-tertiary); color: var(--text-secondary); }
@@ -481,12 +678,11 @@
/* โ”€โ”€ Grid โ”€โ”€ */
.grid {
- max-width: 1120px;
- margin: 1.25rem auto 4rem;
+ margin: 1.25rem 0 4rem;
padding: 0 1.5rem;
display: grid;
- grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
- gap: 0.75rem;
+ grid-template-columns: repeat(3, minmax(0, 1fr));
+ gap: 0.9rem;
}
.card {
@@ -589,6 +785,10 @@
margin-bottom: 0.75rem;
}
+ .card-install--note {
+ justify-content: flex-start;
+ }
+
.card-install code {
font-family: 'JetBrains Mono', monospace;
font-size: 0.75rem;
@@ -668,6 +868,59 @@
margin-bottom: 0.75rem;
}
+ .public-badge {
+ font-size: 0.65rem;
+ font-weight: 600;
+ color: var(--text-tertiary);
+ background: var(--surface-raised);
+ border: 1px solid var(--border);
+ padding: 0.08rem 0.35rem;
+ border-radius: 999px;
+ }
+
+ .public-badge--npm {
+ color: #cb3837;
+ background: rgba(203, 56, 55, 0.1);
+ border-color: rgba(203, 56, 55, 0.14);
+ }
+
+ .public-badge--brew {
+ color: #8b5cf6;
+ background: rgba(139, 92, 246, 0.1);
+ border-color: rgba(139, 92, 246, 0.14);
+ }
+
+ .public-badge--bundled {
+ color: #64748b;
+ background: rgba(100, 116, 139, 0.1);
+ border-color: rgba(100, 116, 139, 0.14);
+ }
+
+ .card-npx {
+ font-size: 0.75rem;
+ color: var(--text-tertiary);
+ margin-top: 0.35rem;
+ }
+
+ .card-npx code {
+ font-family: 'JetBrains Mono', monospace;
+ color: var(--text-secondary);
+ font-size: 0.73rem;
+ }
+
+ .public-panel-note {
+ padding: 0.75rem 1.5rem 0;
+ font-size: 0.74rem;
+ color: var(--text-tertiary);
+ line-height: 1.5;
+ }
+
+ .public-panel-note code {
+ font-family: 'JetBrains Mono', monospace;
+ font-size: 0.72rem;
+ color: var(--text-secondary);
+ }
+
.empty {
grid-column: 1 / -1;
text-align: center;
@@ -772,16 +1025,34 @@
/* โ”€โ”€ Responsive โ”€โ”€ */
@media (max-width: 640px) {
+ .deck-stage { --deck-peek: 46px; }
.hero { padding: 2rem 1.25rem 1.5rem; }
.hero h1 { font-size: 2rem; }
.grid { grid-template-columns: 1fr; padding: 0 1.25rem; }
- .controls { padding: 1.5rem 1.25rem 0; }
- .filter-row { padding: 0.75rem 1.25rem 0; }
+ .controls { padding: 1rem 1.25rem 0; }
+ .filter-row {
+ gap: 0.4rem;
+ row-gap: 0.5rem;
+ padding: 0.75rem 1.25rem 0;
+ }
+ .public-panel-note { padding: 0.7rem 1.25rem 0; }
+ .deck-panel--harness .filter-row {
+ margin-right: calc(var(--deck-peek) * 0.5);
+ padding-right: 1.25rem;
+ }
.nav { padding: 0.75rem 1.25rem; }
.footer { padding: 1.5rem 1.25rem; flex-direction: column; align-items: flex-start; }
.empower-row { flex-direction: column; }
.empower-card { margin: 0 0 1rem; padding: 1.25rem; }
.empower-self .cmd-grid { grid-template-columns: 1fr; }
+ .deck-nav { padding: 1.25rem 1.25rem 0; }
+ .deck-arrow-btn span { display: none; }
+ }
+
+ @media (max-width: 1120px) {
+ .grid {
+ grid-template-columns: repeat(2, minmax(0, 1fr));
+ }
}
@media (max-width: 400px) {
@@ -853,7 +1124,7 @@
<div class="cmd-grid">
<div class="cmd-item"><span class="cmd-name">cli-hub list</span><span class="cmd-desc">Browse all CLIs</span></div>
<div class="cmd-item"><span class="cmd-name">cli-hub search</span><span class="cmd-desc">Find by keyword</span></div>
- <div class="cmd-item"><span class="cmd-name">cli-hub install</span><span class="cmd-desc">Install a CLI</span></div>
+ <div class="cmd-item"><span class="cmd-name">cli-hub install</span><span class="cmd-desc">Install (pip or npm)</span></div>
<div class="cmd-item"><span class="cmd-name">cli-hub info</span><span class="cmd-desc">CLI details</span></div>
<div class="cmd-item"><span class="cmd-name">cli-hub update</span><span class="cmd-desc">Update a CLI</span></div>
<div class="cmd-item"><span class="cmd-name">cli-hub uninstall</span><span class="cmd-desc">Remove a CLI</span></div>
@@ -891,21 +1162,61 @@
</div>
</div>
- <div class="section-divider"></div>
-
- <!-- Controls -->
- <div class="controls">
- <input class="search" type="text" placeholder="Search CLIs..." id="search">
- <select class="sort-select" id="sort">
- <option value="updated">Last updated</option>
- <option value="name">Name</option>
- <option value="category">Category</option>
- </select>
+ <!-- Deck nav -->
+ <div class="deck-nav">
+ <button class="deck-tab active" data-deck="harness" onclick="switchDeck('harness')">
+ CLI-Anything CLIs
+ <span class="deck-count" id="deck-count-harness">&mdash;</span>
+ </button>
+ <button class="deck-tab deck-tab--public" data-deck="public" onclick="switchDeck('public')">
+ Public CLIs
+ <span class="deck-count" id="deck-count-public">&mdash;</span>
+ </button>
+ <span class="deck-separator"></span>
+ <button class="deck-arrow-btn" id="deck-toggle" onclick="toggleDeck()">
+ <span>Public CLIs</span>
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
+ </button>
</div>
- <div class="filter-row" id="filters"></div>
- <!-- Grid -->
- <div class="grid" id="grid"></div>
+ <!-- Deck viewport -->
+ <div class="deck-stage">
+ <div class="deck-viewport">
+ <div class="deck-track" id="deck-track" data-active="harness">
+
+ <!-- Harness deck -->
+ <div class="deck-panel deck-panel--harness" data-peek-label="CLI-Anything">
+ <div class="controls">
+ <input class="search" type="text" placeholder="Search CLIs..." id="search-harness">
+ <select class="sort-select" id="sort-harness">
+ <option value="updated">Last updated</option>
+ <option value="name">Name</option>
+ <option value="category">Category</option>
+ </select>
+ </div>
+ <div class="filter-row" id="filters-harness"></div>
+ <div class="grid" id="grid-harness"></div>
+ </div>
+
+ <!-- Public CLI deck -->
+ <div class="deck-panel deck-panel--public" data-peek-label="Public CLIs">
+ <div class="controls">
+ <input class="search" type="text" placeholder="Search public CLIs..." id="search-public">
+ <select class="sort-select" id="sort-public">
+ <option value="name">Name</option>
+ <option value="category">Category</option>
+ </select>
+ </div>
+ <div class="public-panel-note">
+ Public CLIs remain the property of their respective software owners and maintainers. All rights stay with those owners; CLI-Hub only helps you discover and install them.
+ </div>
+ <div class="filter-row" id="filters-public"></div>
+ <div class="grid" id="grid-public"></div>
+ </div>
+
+ </div>
+ </div>
+ </div>
<!-- Footer -->
<footer class="footer">
@@ -964,47 +1275,72 @@
'../../registry.json',
'https://raw.githubusercontent.com/HKUDS/CLI-Anything/main/registry.json'
];
+ const PUBLIC_REGISTRY_URLS = [
+ '../../public_registry.json',
+ 'https://raw.githubusercontent.com/HKUDS/CLI-Anything/main/public_registry.json'
+ ];
const DATES_URLS = [
'https://hkuds.github.io/CLI-Anything/registry-dates.json',
'../../registry-dates.json'
];
const EXTERNAL_LINK_SVG = '<svg viewBox="0 0 16 16" fill="currentColor"><path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5H4.56l6.72 6.72a.75.75 0 1 1-1.06 1.06L3.5 4.56v2.69a.75.75 0 0 1-1.5 0v-3.5A1.75 1.75 0 0 1 3.75 2Zm7.5 0h1A1.75 1.75 0 0 1 14 3.75v8.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-1a.75.75 0 0 1 1.5 0v1c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-8.5a.25.25 0 0 0-.25-.25h-1a.75.75 0 0 1 0-1.5Z"/></svg>';
- let clis = [];
- let activeFilter = 'all';
- let sortBy = 'updated';
+ let harnessClis = [];
+ let publicClis = [];
+ let activeDeck = 'harness';
- async function loadRegistry() {
+ // Per-deck state
+ const deckState = {
+ harness: { filter: 'all', sort: 'updated', query: '' },
+ public: { filter: 'all', sort: 'name', query: '' },
+ };
+
+ async function fetchJson(urls) {
+ for (const url of urls) {
+ try {
+ const resp = await fetch(url);
+ if (resp.ok) return await resp.json();
+ } catch (_) { continue; }
+ }
+ return null;
+ }
+
+ async function loadRegistries() {
try {
- let resp;
- for (const url of REGISTRY_URLS) {
- try {
- resp = await fetch(url);
- if (resp.ok) break;
- } catch (_) { continue; }
- }
- if (!resp || !resp.ok) throw new Error('Registry load failed');
- const data = await resp.json();
- clis = data.clis;
-
- for (const url of DATES_URLS) {
- try {
- const datesResp = await fetch(url);
- if (datesResp.ok) {
- const dates = await datesResp.json();
- clis.forEach(c => c.last_modified = dates[c.name]);
- break;
- }
- } catch (_) { continue; }
+ const [harnessData, publicData, dates] = await Promise.all([
+ fetchJson(REGISTRY_URLS),
+ fetchJson(PUBLIC_REGISTRY_URLS),
+ fetchJson(DATES_URLS),
+ ]);
+
+ if (!harnessData) throw new Error('Registry load failed');
+
+ harnessClis = harnessData.clis;
+ if (dates) harnessClis.forEach(c => c.last_modified = dates[c.name]);
+
+ if (publicData && publicData.clis) {
+ publicClis = publicData.clis;
}
- document.getElementById('cli-count').textContent = clis.length;
- const categories = [...new Set(clis.map(c => c.category))];
- document.getElementById('category-count').textContent = categories.length;
- buildFilters(categories);
- render();
+ // Update counts
+ const totalClis = harnessClis.length + publicClis.length;
+ const allCategories = [...new Set([...harnessClis, ...publicClis].map(c => c.category))];
+ document.getElementById('cli-count').textContent = totalClis;
+ document.getElementById('category-count').textContent = allCategories.length;
+ document.getElementById('deck-count-harness').textContent = harnessClis.length;
+ document.getElementById('deck-count-public').textContent = publicClis.length;
+
+ // Build filters for harness deck (initial)
+ const harnessCats = [...new Set(harnessClis.map(c => c.category))];
+ buildFilters('harness', harnessCats);
+
+ const publicCats = [...new Set(publicClis.map(c => c.category))];
+ buildFilters('public', publicCats);
+
+ renderDeck('harness');
+ renderDeck('public');
} catch (e) {
- document.getElementById('grid').innerHTML =
+ document.getElementById('grid-harness').innerHTML =
'<div class="empty">Failed to load registry. <a href="' + REPO + '/blob/main/registry.json" style="color:var(--accent)">View source</a></div>';
}
}
@@ -1014,13 +1350,15 @@
return CATEGORY_LABELS[cat] || cat.charAt(0).toUpperCase() + cat.slice(1);
}
- function buildFilters(categories) {
- const container = document.getElementById('filters');
+ function buildFilters(deck, categories) {
+ const container = document.getElementById('filters-' + deck);
+ container.innerHTML = '';
const allBtn = document.createElement('button');
allBtn.className = 'filter-btn active';
allBtn.textContent = 'All';
allBtn.dataset.cat = 'all';
- allBtn.onclick = () => setFilter('all');
+ allBtn.dataset.deck = deck;
+ allBtn.onclick = () => setFilter(deck, 'all');
container.appendChild(allBtn);
categories.sort().forEach(cat => {
@@ -1028,23 +1366,66 @@
btn.className = 'filter-btn';
btn.textContent = catLabel(cat);
btn.dataset.cat = cat;
- btn.onclick = () => setFilter(cat);
+ btn.dataset.deck = deck;
+ btn.onclick = () => setFilter(deck, cat);
container.appendChild(btn);
});
}
- function setFilter(cat) {
- activeFilter = cat;
- document.querySelectorAll('.filter-btn').forEach(b => {
+ function setFilter(deck, cat) {
+ deckState[deck].filter = cat;
+ document.querySelectorAll(`#filters-${deck} .filter-btn`).forEach(b => {
b.classList.toggle('active', b.dataset.cat === cat);
});
- render();
+ renderDeck(deck);
+ }
+
+ function switchDeck(deck) {
+ activeDeck = deck;
+ const track = document.getElementById('deck-track');
+ track.dataset.active = deck;
+ updateDeckPosition();
+ document.querySelectorAll('.deck-tab').forEach(t => {
+ t.classList.toggle('active', t.dataset.deck === deck);
+ });
+ // Update toggle button
+ const toggle = document.getElementById('deck-toggle');
+ if (deck === 'harness') {
+ toggle.querySelector('span').textContent = 'Public CLIs';
+ toggle.querySelector('svg').innerHTML = '<polyline points="9 18 15 12 9 6"/>';
+ toggle.classList.remove('deck-arrow-btn--back');
+ } else {
+ toggle.querySelector('span').textContent = 'CLI-Anything CLIs';
+ toggle.querySelector('svg').innerHTML = '<polyline points="15 18 9 12 15 6"/>';
+ toggle.classList.add('deck-arrow-btn--back');
+ }
+ }
+
+ function toggleDeck() {
+ switchDeck(activeDeck === 'harness' ? 'public' : 'harness');
+ }
+
+ function updateDeckPosition() {
+ const stage = document.querySelector('.deck-stage');
+ const viewport = document.querySelector('.deck-viewport');
+ const track = document.getElementById('deck-track');
+ if (!stage || !viewport || !track) return;
+
+ const peek = parseFloat(getComputedStyle(stage).getPropertyValue('--deck-peek')) || 0;
+ const panelWidth = Math.max(viewport.clientWidth - peek, 0);
+ viewport.style.setProperty('--deck-panel-width', `${panelWidth}px`);
+ track.style.transform = activeDeck === 'public'
+ ? `translateX(-${Math.max(panelWidth - peek, 0)}px)`
+ : 'translateX(0)';
}
- function render() {
- const query = document.getElementById('search').value.toLowerCase();
+ function renderDeck(deck) {
+ const clis = deck === 'harness' ? harnessClis : publicClis;
+ const state = deckState[deck];
+ const query = state.query.toLowerCase();
+
const filtered = clis.filter(c => {
- const matchFilter = activeFilter === 'all' || c.category === activeFilter;
+ const matchFilter = state.filter === 'all' || c.category === state.filter;
const matchSearch = !query ||
c.display_name.toLowerCase().includes(query) ||
c.description.toLowerCase().includes(query) ||
@@ -1053,64 +1434,133 @@
});
filtered.sort((a, b) => {
- if (sortBy === 'updated') return (b.last_modified || '').localeCompare(a.last_modified || '');
- if (sortBy === 'name') return a.display_name.localeCompare(b.display_name);
- if (sortBy === 'category') return a.category.localeCompare(b.category) || a.display_name.localeCompare(b.display_name);
+ if (state.sort === 'updated') return (b.last_modified || '').localeCompare(a.last_modified || '');
+ if (state.sort === 'name') return a.display_name.localeCompare(b.display_name);
+ if (state.sort === 'category') return a.category.localeCompare(b.category) || a.display_name.localeCompare(b.display_name);
return 0;
});
- const grid = document.getElementById('grid');
+ const grid = document.getElementById('grid-' + deck);
if (filtered.length === 0) {
grid.innerHTML = '<div class="empty">No CLIs match your search.</div>';
return;
}
- grid.innerHTML = filtered.map(c => {
- const requiresHtml = c.requires
- ? `<div class="card-requires"><strong>Requires</strong> ${esc(c.requires)}</div>`
- : '';
- const skillLink = c.skill_md
- ? `<a href="${c.skill_md.startsWith('http') ? c.skill_md : `${REPO}/blob/main/${c.skill_md}`}" target="_blank">Skill</a>`
- : '';
- const sourceLink = c.source_url
- ? `<a href="${esc(c.source_url)}" target="_blank">Source</a>`
- : `<a href="${REPO}/tree/main/${c.name}/agent-harness" target="_blank">Source</a>`;
- const titleHtml = c.homepage
- ? `<a href="${esc(c.homepage)}" target="_blank">${esc(c.display_name)}${EXTERNAL_LINK_SVG}</a>`
- : esc(c.display_name);
- const contributors = c.contributors || (c.contributor ? [{name: c.contributor, url: c.contributor_url}] : []);
- const isTeam = contributors.length === 1 && contributors[0].name === 'CLI-Anything-Team';
- const contributorHtml = contributors.length
- ? `<div class="card-contributor">
- ${contributors.map(ct => `<a href="${esc(ct.url)}" target="_blank">${esc(ct.name)}</a>`).join(', ')}${isTeam ? '' : '<span class="community-badge">Community</span>'}
- </div>`
- : '';
- const dateHtml = c.last_modified
- ? `<div class="card-date">Updated ${esc(c.last_modified)}</div>`
- : '';
-
- return `
- <div class="card">
- <div class="card-head">
- <span class="card-title">${titleHtml}</span>
- <div class="card-meta">
- <span class="category-tag">${catLabel(c.category)}</span>
- <span class="card-version">${esc(c.version)}</span>
- </div>
- </div>
- <div class="card-desc">${esc(c.description)}</div>
- ${dateHtml}
- ${requiresHtml}
- <div class="card-install">
- <code>pip install cli-anything-hub\ncli-hub install ${esc(c.name)}</code>
- <button class="card-copy-btn" onclick="copyCmd(this, 'pip install cli-anything-hub &amp;&amp; cli-hub install ${esc(c.name)}')">Copy</button>
- </div>
- <div class="card-footer">
- <div class="card-links">${sourceLink}${skillLink ? ' &middot; ' + skillLink : ''}</div>
- ${contributorHtml}
+ if (deck === 'harness') {
+ grid.innerHTML = filtered.map(renderHarnessCard).join('');
+ } else {
+ grid.innerHTML = filtered.map(renderNpmCard).join('');
+ }
+ }
+
+ function renderHarnessCard(c) {
+ const requiresHtml = c.requires
+ ? `<div class="card-requires"><strong>Requires</strong> ${esc(c.requires)}</div>`
+ : '';
+ const skillLink = c.skill_md
+ ? `<a href="${c.skill_md.startsWith('http') ? c.skill_md : `${REPO}/blob/main/${c.skill_md}`}" target="_blank">Skill</a>`
+ : '';
+ const sourceLink = c.source_url
+ ? `<a href="${esc(c.source_url)}" target="_blank">Source</a>`
+ : `<a href="${REPO}/tree/main/${c.name}/agent-harness" target="_blank">Source</a>`;
+ const titleHtml = c.homepage
+ ? `<a href="${esc(c.homepage)}" target="_blank">${esc(c.display_name)}${EXTERNAL_LINK_SVG}</a>`
+ : esc(c.display_name);
+ const contributors = c.contributors || (c.contributor ? [{name: c.contributor, url: c.contributor_url}] : []);
+ const isTeam = contributors.length === 1 && contributors[0].name === 'CLI-Anything-Team';
+ const contributorHtml = contributors.length
+ ? `<div class="card-contributor">
+ ${contributors.map(ct => `<a href="${esc(ct.url)}" target="_blank">${esc(ct.name)}</a>`).join(', ')}${isTeam ? '' : '<span class="community-badge">Community</span>'}
+ </div>`
+ : '';
+ const dateHtml = c.last_modified
+ ? `<div class="card-date">Updated ${esc(c.last_modified)}</div>`
+ : '';
+
+ return `
+ <div class="card">
+ <div class="card-head">
+ <span class="card-title">${titleHtml}</span>
+ <div class="card-meta">
+ <span class="category-tag">${catLabel(c.category)}</span>
+ <span class="card-version">${esc(c.version)}</span>
</div>
+ </div>
+ <div class="card-desc">${esc(c.description)}</div>
+ ${dateHtml}
+ ${requiresHtml}
+ <div class="card-install">
+ <code>pip install cli-anything-hub\ncli-hub install ${esc(c.name)}</code>
+ <button class="card-copy-btn" onclick="copyCmd(this, 'pip install cli-anything-hub &amp;&amp; cli-hub install ${esc(c.name)}')">Copy</button>
+ </div>
+ <div class="card-footer">
+ <div class="card-links">${sourceLink}${skillLink ? ' &middot; ' + skillLink : ''}</div>
+ ${contributorHtml}
+ </div>
+ </div>`;
+ }
+
+ function formatPublicManager(c) {
+ const manager = (c.package_manager || c.install_strategy || 'public').toLowerCase();
+ const labelMap = { npm: 'npm', brew: 'brew', bundled: 'bundled' };
+ const label = labelMap[manager] || manager;
+ return `<span class="public-badge public-badge--${esc(manager)}">${esc(label)}</span>`;
+ }
+
+ function publicDirectCmd(c) {
+ return c.direct_cmd || c.entry_point || c.npx_cmd || '';
+ }
+
+ function renderNpmCard(c) {
+ const isBundled = (c.install_strategy || c.package_manager) === 'bundled';
+ const requiresHtml = c.requires
+ ? `<div class="card-requires"><strong>Requires</strong> ${esc(c.requires)}</div>`
+ : '';
+ const titleHtml = c.homepage
+ ? `<a href="${esc(c.homepage)}" target="_blank">${esc(c.display_name)}${EXTERNAL_LINK_SVG}</a>`
+ : esc(c.display_name);
+ const sourceLink = c.source_url
+ ? `<a href="${esc(c.source_url)}" target="_blank">Source</a>`
+ : '';
+ const contributors = c.contributors || [];
+ const contributorHtml = contributors.length
+ ? `<div class="card-contributor">
+ ${contributors.map(ct => `<a href="${esc(ct.url)}" target="_blank">${esc(ct.name)}</a>`).join(', ')}
+ </div>`
+ : '';
+ const directCmd = c.install_cmd || publicDirectCmd(c);
+ const directCmdHtml = directCmd && !isBundled
+ ? `<div class="card-npx">Or run directly: <code>${esc(directCmd)}</code></div>`
+ : '';
+ const installNotesHtml = c.install_notes
+ ? `<div class="card-npx">${esc(c.install_notes)}</div>`
+ : '';
+ const cliHubInstallHtml = isBundled
+ ? `<div class="card-install card-install--note"><code>Bundled with the upstream app</code></div>`
+ : `<div class="card-install">
+ <code>pip install cli-anything-hub\ncli-hub install ${esc(c.name)}</code>
+ <button class="card-copy-btn" onclick="copyCmd(this, 'pip install cli-anything-hub &amp;&amp; cli-hub install ${esc(c.name)}')">Copy</button>
</div>`;
- }).join('');
+
+ return `
+ <div class="card">
+ <div class="card-head">
+ <span class="card-title">${titleHtml}</span>
+ <div class="card-meta">
+ ${formatPublicManager(c)}
+ <span class="category-tag">${catLabel(c.category)}</span>
+ </div>
+ </div>
+ <div class="card-desc">${esc(c.description)}</div>
+ ${requiresHtml}
+ ${cliHubInstallHtml}
+ ${directCmdHtml}
+ ${installNotesHtml}
+ <div class="card-footer">
+ <div class="card-links">${sourceLink}</div>
+ ${contributorHtml}
+ </div>
+ </div>`;
}
function copyCmd(btn, cmd) {
@@ -1127,12 +1577,27 @@
return d.innerHTML;
}
- document.getElementById('search').addEventListener('input', render);
- document.getElementById('sort').addEventListener('change', (e) => {
- sortBy = e.target.value;
- render();
+ // Wire up search and sort for each deck
+ document.getElementById('search-harness').addEventListener('input', (e) => {
+ deckState.harness.query = e.target.value;
+ renderDeck('harness');
+ });
+ document.getElementById('sort-harness').addEventListener('change', (e) => {
+ deckState.harness.sort = e.target.value;
+ renderDeck('harness');
+ });
+ document.getElementById('search-public').addEventListener('input', (e) => {
+ deckState.public.query = e.target.value;
+ renderDeck('public');
});
- loadRegistry();
+ document.getElementById('sort-public').addEventListener('change', (e) => {
+ deckState.public.sort = e.target.value;
+ renderDeck('public');
+ });
+
+ window.addEventListener('resize', updateDeckPosition);
+
+ loadRegistries().then(updateDeckPosition);
// โ”€โ”€ Visitor classification: human vs AI agent โ”€โ”€
(function() {
diff --git a/public_registry.json b/public_registry.json
new file mode 100644
index 000000000..ba6712d78
--- /dev/null
+++ b/public_registry.json
@@ -0,0 +1,201 @@
+{
+ "meta": {
+ "repo": "https://github.com/HKUDS/CLI-Anything",
+ "description": "Public CLI Registry โ€” Third-party and official CLIs managed by CLI-Hub across npm, bundled, brew, and other install methods",
+ "updated": "2026-04-15"
+ },
+ "clis": [
+ {
+ "name": "feishu",
+ "display_name": "Feishu/Lark CLI",
+ "version": "latest",
+ "description": "Official Lark (Feishu) CLI for managing Lark apps, bots, and cloud resources from the terminal",
+ "category": "communication",
+ "requires": "Node.js >= 16",
+ "homepage": "https://github.com/larksuite/cli",
+ "source_url": "https://github.com/larksuite/cli",
+ "package_manager": "npm",
+ "npm_package": "@anthropic-ai/feishu-cli",
+ "install_cmd": "npm install -g @anthropic-ai/feishu-cli",
+ "npx_cmd": "npx @anthropic-ai/feishu-cli",
+ "entry_point": "feishu",
+ "contributors": [
+ {
+ "name": "larksuite",
+ "url": "https://github.com/larksuite"
+ }
+ ]
+ },
+ {
+ "name": "minimax-cli",
+ "display_name": "MiniMax CLI",
+ "version": "latest",
+ "description": "MiniMax AI platform CLI for managing tokens, models, and API interactions from the command line",
+ "category": "ai",
+ "requires": "Node.js >= 16, MINIMAX_API_KEY",
+ "homepage": "https://platform.minimax.io",
+ "source_url": null,
+ "package_manager": "npm",
+ "npm_package": "minimax-cli",
+ "install_cmd": "npm install -g minimax-cli",
+ "npx_cmd": "npx minimax-cli",
+ "entry_point": "minimax-cli",
+ "contributors": [
+ {
+ "name": "MiniMax",
+ "url": "https://platform.minimax.io"
+ }
+ ]
+ },
+ {
+ "name": "wecom",
+ "display_name": "WeCom CLI",
+ "version": "latest",
+ "description": "Official WeCom open-platform CLI for contacts, todos, meetings, messages, calendars, docs, and smart sheets",
+ "category": "communication",
+ "requires": "Node.js >= 18, WeCom account (currently limited rollout), optional Bot ID + Secret for bot flows",
+ "homepage": "https://open.work.weixin.qq.com/",
+ "source_url": "https://github.com/WecomTeam/wecom-cli",
+ "package_manager": "npm",
+ "npm_package": "@wecom/cli",
+ "install_cmd": "npm install -g @wecom/cli",
+ "npx_cmd": "npx @wecom/cli",
+ "entry_point": "wecom-cli",
+ "contributors": [
+ {
+ "name": "WecomTeam",
+ "url": "https://github.com/WecomTeam"
+ }
+ ]
+ },
+ {
+ "name": "contentful",
+ "display_name": "Contentful CLI",
+ "version": "latest",
+ "description": "Official Contentful CLI for spaces, migrations, imports, exports, seeding, and environment management",
+ "category": "web",
+ "requires": "Node.js LTS, Contentful account and space access",
+ "homepage": "https://www.contentful.com/",
+ "source_url": "https://github.com/contentful/contentful-cli",
+ "package_manager": "npm",
+ "npm_package": "contentful-cli",
+ "install_cmd": "npm install -g contentful-cli",
+ "npx_cmd": "npx contentful-cli",
+ "entry_point": "contentful",
+ "contributors": [
+ {
+ "name": "Contentful",
+ "url": "https://github.com/contentful"
+ }
+ ]
+ },
+ {
+ "name": "sanity",
+ "display_name": "Sanity CLI",
+ "version": "latest",
+ "description": "Official Sanity CLI for studios, datasets, schemas, imports, exports, and structured content workflows",
+ "category": "web",
+ "requires": "Node.js and npm, Sanity account/project access",
+ "homepage": "https://www.sanity.io/",
+ "source_url": "https://github.com/sanity-io/sanity",
+ "package_manager": "npm",
+ "npm_package": "sanity",
+ "install_cmd": "npm install -g sanity",
+ "npx_cmd": "npx sanity@latest",
+ "entry_point": "sanity",
+ "contributors": [
+ {
+ "name": "Sanity",
+ "url": "https://github.com/sanity-io"
+ }
+ ]
+ },
+ {
+ "name": "shopify",
+ "display_name": "Shopify CLI",
+ "version": "latest",
+ "description": "Official Shopify CLI for apps, themes, functions, extensions, and Hydrogen storefront workflows",
+ "category": "web",
+ "requires": "Node.js and npm, Shopify Partner/store access",
+ "homepage": "https://shopify.dev/docs/api/shopify-cli",
+ "source_url": "https://github.com/Shopify/cli",
+ "package_manager": "npm",
+ "npm_package": "@shopify/cli",
+ "install_cmd": "npm install -g @shopify/cli",
+ "npx_cmd": "npx @shopify/cli@latest",
+ "entry_point": "shopify",
+ "contributors": [
+ {
+ "name": "Shopify",
+ "url": "https://github.com/Shopify"
+ }
+ ]
+ },
+ {
+ "name": "sentry",
+ "display_name": "Sentry CLI",
+ "version": "latest",
+ "description": "Official Sentry CLI for releases, sourcemaps, debug files, monitors, and org/project automation",
+ "category": "devops",
+ "requires": "Sentry account plus auth token/org/project access for most operations",
+ "homepage": "https://docs.sentry.io/cli/",
+ "source_url": "https://github.com/getsentry/sentry-cli",
+ "package_manager": "npm",
+ "npm_package": "@sentry/cli",
+ "install_cmd": "npm install -g @sentry/cli",
+ "npx_cmd": "npx @sentry/cli",
+ "entry_point": "sentry-cli",
+ "contributors": [
+ {
+ "name": "Sentry",
+ "url": "https://github.com/getsentry"
+ }
+ ]
+ },
+ {
+ "name": "1password-cli",
+ "display_name": "1Password CLI",
+ "version": "latest",
+ "description": "Official 1Password CLI for vault access, secrets retrieval, item automation, and desktop-app-backed authentication",
+ "category": "devops",
+ "requires": "1Password account; desktop app integration recommended for biometric/system-auth sign-in",
+ "homepage": "https://developer.1password.com/docs/cli/get-started/",
+ "source_url": null,
+ "package_manager": "brew",
+ "install_strategy": "command",
+ "install_cmd": "brew install --cask 1password-cli",
+ "uninstall_cmd": "brew uninstall --cask 1password-cli",
+ "update_cmd": "brew upgrade --cask 1password-cli",
+ "entry_point": "op",
+ "contributors": [
+ {
+ "name": "1Password",
+ "url": "https://1password.com"
+ }
+ ]
+ },
+ {
+ "name": "obsidian-cli",
+ "display_name": "Obsidian CLI",
+ "version": "bundled",
+ "description": "Official Obsidian command line interface for vault automation, developer tools, screenshots, search, history, and plugin workflows",
+ "category": "knowledge",
+ "requires": "Obsidian 1.12.7+ installer, Obsidian desktop app running, and Command line interface enabled in Settings โ†’ General",
+ "homepage": "https://obsidian.md/help/cli",
+ "source_url": null,
+ "package_manager": "bundled",
+ "install_strategy": "bundled",
+ "install_notes": "Bundled within the Obsidian 1.12+ installer. Enable Command line interface in Obsidian settings and follow the registration prompt so `obsidian` is added to PATH.",
+ "uninstall_notes": "Disable Command line interface from Obsidian settings or remove/update the Obsidian installer to stop using the bundled CLI.",
+ "update_notes": "Update the Obsidian installer to a newer 1.12+ release to update the bundled CLI.",
+ "entry_point": "obsidian",
+ "detect_cmd": "obsidian",
+ "contributors": [
+ {
+ "name": "Obsidian",
+ "url": "https://obsidian.md"
+ }
+ ]
+ }
+ ]
+}