
CLI Command Explainer
@zmwaiworld
CLI Command Explainer について
Know what every shell command does before you approve it.
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"cmd-explain": {
"command": "npx",
"args": [
"-y",
"cmd-explain"
]
}
}
}ツール
1Explains 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 /orcurl … | 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 Framework
QuantGeekDevThe Typescript MCP Framework
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
MCP Inspector
modelcontextprotocolVisual testing tool for MCP servers
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
コメント