PHPackages                             derhasi/buddy - 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. [CLI &amp; Console](/categories/cli)
4. /
5. derhasi/buddy

ActiveCli[CLI &amp; Console](/categories/cli)

derhasi/buddy
=============

Command line tool for locating command line tools in a parent or project scope

0.1.0(10y ago)565[5 issues](https://github.com/derhasi/buddy/issues)GPLv3PHP

Since Aug 17Pushed 8y ago2 watchersCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (0)

buddy
=====

[](#buddy)

A command line tool to help you execute a command in the direct location

Example commands
----------------

[](#example-commands)

```
buddy composer
buddy drush
b drush # Alternate shortcut

```

Example .buddy.yml
------------------

[](#example-buddyyml)

For providing buddy command shortcuts, simply place a `.buddy.yml` in the current or any parent folder.

```
commands:
  # calls the global composer command from the root folder
  composer:
    cmd: composer
    workingDir: $DIR
  # Calls a local drush command in ./vendor/bin/drush
  drush:
    cmd: drush
    cmdDir: $DIR/vendor/bin
    workingDir: $DIR
    #defaults: # not implemented yet
    #  uri: http://example.com
    #  root: $DIR/docroot
root: false
```

`buddy` supports multiple config files, so commands from a parent folders will get merged. Command shortcuts from subfolders take precedence over those of parent folders with the same name.

### Structure

[](#structure)

- `commands`: This holds a list of command shortcuts. The key is the shortcut to use with `buddy` in the CLI.
- `root`: If set to `true`, configuration files in parent folders will get ignored

### Command options

[](#command-options)

- `cmd` (required): the actual cli command to call
- `cmdDir` (optional): directory the command is located in. When the directory is not given, global commands can be executed.
- `workingDir` (optional): Location from where to call the given command. Defaults to the current working directory.

### Replacement patterns

[](#replacement-patterns)

Following replacement patterns can be used for replacing parts of a directory value:

- `$CWD`: Current working directory
- `$DIR`: Directory of the .buddy.yml file hlding the command configuration

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

[](#installation)

After [installing composer](https://getcomposer.org/doc/00-intro.md) you can install the command globally:

- Run `composer global require derhasi/buddy:dev-master` to install globally.
- Make sure `~/.composer/vendor/bin` is part of your `$PATH`, e.g. by adding `export PATH=~/.composer/vendor/bin:$PATH` to your `.bashrc`or `.profile`

Support
-------

[](#support)

Please post an issue in the [issue queue](https://github.com/derhasi/buddy/issues)in the case you need support or detect any errors. [Pull requests](https://help.github.com/articles/using-pull-requests/)are welcome too.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

3928d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5613deedd974152f066c46795af9d5dd85cb84bd0c05ebb921287479c82b0c0f?d=identicon)[derhasi](/maintainers/derhasi)

---

Top Contributors

[![derhasi](https://avatars.githubusercontent.com/u/118502?v=4)](https://github.com/derhasi "derhasi (14 commits)")

### Embed Badge

![Health badge](/badges/derhasi-buddy/health.svg)

```
[![Health](https://phpackages.com/badges/derhasi-buddy/health.svg)](https://phpackages.com/packages/derhasi-buddy)
```

###  Alternatives

[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[drupal/console-core

Drupal Console Core

13514.7M12](/packages/drupal-console-core)[acmephp/acmephp

Let's Encrypt client written in PHP

649155.1k](/packages/acmephp-acmephp)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)

PHPackages © 2026

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