list

A command that lists installed and generated CLI-Anything tools. It can scan a directory, limit how deeply it searches, and output the results as JSON for other programs to read.

In plain words
What is it for?
Use it to find installed cli-anything packages and generated tools, inspect their software names, versions, and executables, or scan a chosen directory at a selected depth.
Why use it?
It gives a quick inventory of which generated command-line tools are available instead of requiring you to search manually. JSON output makes the inventory usable in scripts and automation.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/hkuds/cli-anything/list
Clone the repo
git clone --depth 1 https://github.com/HKUDS/CLI-Anything
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,794 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01794
Opus 5 $0.00000 $0.00897
Sonnet 5 $0.00000 $0.00359
Haiku 4.5 $0.00000 $0.00179

Measured yesterday against content hash c3ce736eda52, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

list scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cli-anything-plugin/commands/list.md · 238 lines

How it starts

The opening of the file, as written. The whole thing — 238 lines — stays where its author put it; the contents beside it link to each section on GitHub.

cli-anything:list Command

List all available CLI-Anything tools (installed and generated).

Usage

/cli-anything:list [--path <directory>] [--depth <n>] [--json]

Options

  • --path <directory> - Directory to search for generated CLIs (default: current directory)
  • --depth <n> - Maximum recursion depth for scanning (default: unlimited). Use 0 for current directory only, 1 for one level deep, etc.
  • --json - Output in JSON format for machine parsing

What This Command Does

Displays all CLI-Anything tools available in the system:

1. Installed CLIs

Uses importlib.metadata to find installed cli-anything-* packages:

  • Pattern: package name starts with cli-anything-
  • Extracts: software name, version, entry point
from importlib.metadata import distributions

installed = {}
for dist in distributions():
    name = dist.metadata.get("Name", "")
    if name.startswith("cli-anything-"):
        software = name.replace("cli-anything-", "")
        version = dist.version
        # Find executable via entry points or shutil.which
        executable = shutil.which(f"cli-anything-{software}")
        installed[software] = {
            "status": "installed",
            "version": version,
            "executable": executable
        }

2. Generated CLIs

Uses glob to find local CLI directories:

  • Pattern: **/agent-harness/cli_anything/*/__init__.py (or depth-limited variant)
  • Extracts: software name, version (from setup.py), source path
  • Status: generated
from pathlib import Path
import glob
import re

search_path = args.get("path", ".")
max_depth = args.get("depth", None)  # None means unlimited
generated = {}

def extract_version_from_setup(setup_path):
    """Extract version from setup.py using regex."""
    try:
        content = Path(setup_path).read_text()
        match = re.search(r'version\s*=\s*["\']([^"\']+)["\']', content)
        return match.group(1) if match else None
    except:
        return None

def build_glob_patterns(base_path, depth):
    """Build list of glob patterns for depths 0 through max_depth.

    Returns multiple patterns so that --depth 2 finds tools at depth 0, 1, AND 2.
    """
    base = Path(base_path)
    suffix = "agent-harness/cli_anything/*/__init__.py"

    if depth is None:
        # Unlimited depth: use **
        return [str(base / "**" / suffix)]

    # Generate patterns for all depths from 0 to max_depth
    patterns = []
    for d in range(depth + 1):
        if d == 0:
            # depth 0: look in current directory
            patterns.append(str(base / suffix))
        else:
            # depth N: look N levels deep
            prefix = "/".join(["*"] * d)
            patterns.append(str(base / prefix / suffix))
    return patterns

patterns = build_glob_patterns(search_path, max_depth)
for pattern in patterns:
    for init_file in glob.glob(pattern, recursive=True):
        parts = Path(init_file).parts
        # Find cli_anything/<software> pattern
        for i, p in enumerate(parts):
            if p == "cli_anything" and i + 1 < len(parts):
                software = parts[i + 1]
                # Get agent-harness directory as source
                agent_harness_idx = parts.index("agent-harness") if "agent-harness" in parts else i - 1
                source = str(Path(*parts[:agent_harness_idx + 2]))  # up to agent-harness
                # Extract version from setup.py (setup.py is in agent-harness/, not cli_anything/)
                setup_path = Path(*parts[:agent_harness_idx + 1]) / "setup.py"
                version = extract_version_from_setup(setup_path)
                generated[software] = {
                    "status": "generated",
                    "version": version,
                    "executable": None,
                    "source": source
                }
                break

Read the full file on GitHub · 238 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 238 lines · 0 tokens per session scan A c3ce736eda52

Subscribe to this mod's changes

list is a command published in the GitHub repository HKUDS/CLI-Anything (48,669 stars, last pushed 11d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,794 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.