MCP.so
登录

CLI Command Explainer

@zmwaiworld

关于 CLI Command Explainer

Know what every shell command does before you approve it.

基本信息

分类

开发工具

传输方式

stdio

发布者

zmwaiworld

提交者

Zhenming Wang

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "cmd-explain": {
      "command": "npx",
      "args": [
        "-y",
        "cmd-explain"
      ]
    }
  }
}

工具

1

Explains a CLI command in one sentence. Returns the explanation, risk level (low/medium/high), and parsed command structure.

概览

What is CLI Command Explainer?

CLI Command Explainer is an MCP server that intercepts every shell command an AI coding agent proposes to run and displays a plain-English explanation with a risk rating before the user approves or denies it. It works with Kiro, Cursor, VS Code, Windsurf, and Claude Code.

How to use CLI Command Explainer?

Run npx cmd-explain setup — the command auto-detects your IDE, installs the MCP server, and creates a pre‑command hook. Restart your IDE and every agent‑proposed shell command will be explained automatically. Manual install by adding the MCP configuration is also supported.

Key features of CLI Command Explainer

  • Built‑in dictionary covering 240+ programs and 440+ command explanations
  • Falls back to system man pages for installed tools (Tier 2)
  • Optional local AI via Ollama, OpenAI, or Anthropic (Tier 3)
  • Risk classification: low (read‑only), medium (state‑changing), high (destructive)
  • Detects common shell patterns like 2>&1, || true, and command substitution
  • Supports macOS, Linux, and Windows with zero‑config setup

Use cases of CLI Command Explainer

  • Understanding what a complex agent‑proposed command actually does before approving it
  • Avoiding dangerous commands like rm -rf / or curl … | sudo bash
  • Learning the meaning of shell flags and redirections without leaving the flow
  • Adding a security layer to AI coding agents in team or production environments

FAQ from CLI Command Explainer

What are the requirements to run CLI Command Explainer?

Node.js 18 or later is required. No API keys, no Ollama installation, and no configuration files are needed for the built‑in and man‑page tiers.

How does CLI Command Explainer get its explanations?

It uses three tiers checked in order: a built‑in dictionary (Tier 1, ~90% of agent commands), system man pages (Tier 2), and optional local AI via Ollama, OpenAI, or Anthropic (Tier 3). Tiers 1 and 2 are fully offline.

What does the risk classification mean?

Low risk means read‑only commands with no side effects. Medium risk means state‑changing but reversible operations. High risk means destructive or irreversible actions. Unknown risk is applied to commands not recognized by any tier.

Does CLI Command Explainer work on Windows?

Setup and the dictionary work on Windows. Man‑page parsing (Tier 2) uses --help only; the other tiers work fully.

How do I remove CLI Command Explainer?

Run npx cmd-explain uninstall. This removes the MCP configuration and hook files from all detected IDEs cleanly.

评论

开发工具 分类下的更多 MCP 服务器