← 返回
未分类 中文

Which Tool

Locate the full path of executable commands in the system PATH. Find command locations, verify installation, and resolve command conflicts.
在系统 PATH 中定位可执行命令的完整路径,查找命令位置,验证安装并解决冲突。
dinghaibin
未分类 clawhub v1.0.0 1 版本 99567.1 Key: 无需
★ 0
Stars
📥 230
下载
💾 0
安装
1
版本
#latest

概述

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

# 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

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

# 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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-13 07:06 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Schedule Task

dinghaibin
在 Linux/Unix 系统上调度和运行周期性任务。适用于设置 cron 作业、定时备份、周期性数据同步、自动报告等场景。
★ 0 📥 405

Unexpand Tool

dinghaibin
将文本文件中的空格转为制表符,保持统一缩进并减小文件大小。
★ 0 📥 387

Automation Workflow

dinghaibin
创建并管理自动化工作流,以处理重复性任务。适用于需要安排周期性数据同步、链式API调用、设置触发动作等场景。
★ 0 📥 369