PHPackages                             nubs/which-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. nubs/which-cli

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nubs/which-cli
==============

A symfony/console command similar to the standard which command.

v1.0.0(11y ago)0111MITPHPPHP ~5.4

Since Jul 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nubs/which-cli)[ Packagist](https://packagist.org/packages/nubs/which-cli)[ RSS](/packages/nubs-which-cli/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Which CLI
=========

[](#which-cli)

A PHP symfony/console command similar to the standard which command.

[![Build Status](https://camo.githubusercontent.com/287861a2ac07ca81c127f68ca7868a382541e4e573955427a532cf0d2b8fd7af/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://travis-ci.org/nubs/which-cli)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/eaaeb314deaf7ee58c97c739453fd2edf36f5199387fb8045f431d62a5fb3ea4/687474703a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://scrutinizer-ci.com/g/nubs/which-cli/)[![Code Coverage](https://camo.githubusercontent.com/84269423e36159f79125bf3052556d70d89605fb9e8a0c6328fca319e7efb690/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://coveralls.io/r/nubs/which-cli)

[![Latest Stable Version](https://camo.githubusercontent.com/0082a4d83e8fa56e411232cd0978efc02b91541a7f58eafad04a6f493365bdb6/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://packagist.org/packages/nubs/which-cli)[![Total Downloads](https://camo.githubusercontent.com/bb6b8905f80e00bfc67f75bb8792a90dea884e27cdf66d8b715279d5f9fa6c1f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://packagist.org/packages/nubs/which-cli)[![License](https://camo.githubusercontent.com/d850d769e2825a431ad3f4e32ef2b9bea40d6786e76f8861fddcd0372b4eb9d8/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6e7562732f77686963682d636c692e7376673f7374796c653d666c6174)](https://packagist.org/packages/nubs/which-cli)

[![Dependency Status](https://camo.githubusercontent.com/c3ef3bbe550ede8a5fd02859b77d92c68189c483471787c681648d75c0ee45db/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533626464373663653164313538336538323030303238612f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/53bdd76ce1d1583e8200028a)

Requirements
------------

[](#requirements)

This script requires PHP 5.6, or newer.

Installation
------------

[](#installation)

This package uses [composer](https://getcomposer.org) so you can install it using composer. Composer can install the command globally using:

```
composer global require nubs/which-cli
```

This will install it to your `$COMPOSER_HOME` directory (typically `$HOME/.composer`). The `which` binary will be symlinked to `$COMPOSER_HOME/vendor/bin/which` (e.g., `$HOME/.composer/vendor/bin/which`).

Usage
-----

[](#usage)

The included `which` executable works much like the standard which utility. It takes an arbitrary number of parameters and outputs the path to each of them.

```
$ which more vim foo
/bin/more
/usr/bin/vim
foo not found
```

For windows users, composer will create a `which.bat` script in its bin directory that can be executed in much the same way as on a POSIX system. Alternatively, a `which.bat` script is included. You may need to add the `bin` directory from this repository to your `PATH` environment variable to be able to access the command globally.

License
-------

[](#license)

which-cli is licensed under the MIT license. See [LICENSE](LICENSE) for the full license text.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4331d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/43e7568db49cb140fe4deef1e585de0874e2a962a1140662003a5c070f536879?d=identicon)[nubs](/maintainers/nubs)

---

Top Contributors

[![nubs](https://avatars.githubusercontent.com/u/57673?v=4)](https://github.com/nubs "nubs (45 commits)")[![DanAtDE](https://avatars.githubusercontent.com/u/1520336?v=4)](https://github.com/DanAtDE "DanAtDE (1 commits)")

---

Tags

executablepathlinuxwindowsscriptwhich

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nubs-which-cli/health.svg)

```
[![Health](https://phpackages.com/badges/nubs-which-cli/health.svg)](https://phpackages.com/packages/nubs-which-cli)
```

###  Alternatives

[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[league/uri-components

URI components manipulation library

31932.3M67](/packages/league-uri-components)[matthiasmullie/path-converter

Relative path converter

10229.6M7](/packages/matthiasmullie-path-converter)[jolicode/php-os-helper

Helpers to detect the OS of the machine where PHP is running.

212.8M4](/packages/jolicode-php-os-helper)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[sebastianfeldmann/camino

Path management the OO way

176.4M1](/packages/sebastianfeldmann-camino)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
