Other v1.0.0

which-tool

Locate the full path of executable commands in the system PATH. Find command locations, verify installation, and resolve...

dinghaibin 更新于 2026-05-13 1 浏览
下载 SKILL

技能说明

Locate the full path of executable commands in the system PATH. Find command locations, verify installation, and resolve command conflicts.

使用场景

Find the absolute path of executable commands by searching the system PATH. Essential for verifying installations, debugging "command not found" errors, detecting conflicting versions, and scripting command discovery.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/which-tool
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

5 个文件 · 16 kB
SKILL.md text/markdown
---
name: which-tool
description: Locate the full path of executable commands in the system PATH. Find command locations, verify installation, and resolve command conflicts.
---

# Which Tool — Command Path Locator

Find the absolute path of executable commands by searching the system PATH. Essential for verifying installations, debugging "command not found" errors, detecting conflicting versions, and scripting command discovery.

## Quick Start

```bash
# Find where a command is installed
which-tool python

# Find multiple commands at once
which-tool python git docker

# Find all matching paths (not just the first)
which-tool -a node
```

## Usage

```bash
which-tool COMMAND [COMMAND...] [OPTIONS]

Options:
  -a, --all          Show all matching paths, not just the first
  -s, --silent       Exit silently (exit code only, no output)
  --readable         Show only readable executables
  --skip-aliases     Skip shell aliases, search real PATH only
  --json             Output as JSON array
  --resolve-symlinks Show real path after resolving symlinks
```

## Examples

```bash
# Check if a command exists
which-tool python3

# Find all Python installations
which-tool -a python3

# Check multiple tools before running a script
which-tool git node npm docker

# Silent check for scripts (use exit code)
which-tool -s required-tool && echo "Found"

# Resolve actual binary through symlinks
which-tool --resolve-symlinks node

# JSON output for automated checks
which-tool python java go --json
```

## Features

- **Standard PATH search** — follows shell PATH order
- **All matches** — `-a` flag to see every matching path
- **Silent mode** — exit code only, for script conditionals
- **Symlink resolution** — see the real target binary
- **Multiple commands** — batch check in one call
- **JSON output** — structured results for automation
- **Readable check** — filter to actually executable files

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。