PHPackages                             clue/graph-composer - 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. clue/graph-composer

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

clue/graph-composer
===================

Dependency graph visualization for composer.json

v1.1.0(6y ago)93798.0k↓58.3%58[5 issues](https://github.com/clue/graph-composer/issues)[1 PRs](https://github.com/clue/graph-composer/pulls)8MITPHPPHP &gt;=5.3.6CI passing

Since May 15Pushed 9mo ago17 watchersCompare

[ Source](https://github.com/clue/graph-composer)[ Packagist](https://packagist.org/packages/clue/graph-composer)[ Docs](https://github.com/clue/graph-composer)[ Fund](https://clue.engineering/support)[ GitHub Sponsors](https://github.com/clue)[ RSS](/packages/clue-graph-composer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (8)

clue/graph-composer
===================

[](#cluegraph-composer)

[![CI status](https://github.com/clue/graph-composer/workflows/CI/badge.svg)](https://github.com/clue/graph-composer/actions)[![downloads on GitHub](https://camo.githubusercontent.com/9b6cd4a7642bd66d1c92391bf4442ccd26b19b4284b1b0590be65950585e72f7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f636c75652f67726170682d636f6d706f7365722f746f74616c3f636f6c6f723d626c7565266c6162656c3d646f776e6c6f6164732532306f6e253230476974487562)](https://github.com/clue/graph-composer/releases)[![installs on Packagist](https://camo.githubusercontent.com/0725c1d005204ed317383ce240dbd7382e13b5047c577a94f2c7fd2d33e9dd59/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636c75652f67726170682d636f6d706f7365723f636f6c6f723d626c7565266c6162656c3d696e7374616c6c732532306f6e2532305061636b6167697374)](https://packagist.org/packages/clue/graph-composer)

Graph visualization for your project's `composer.json` and its dependencies:

[![dependency graph for clue/graph-composer](https://cloud.githubusercontent.com/assets/776829/11199047/46dd4dd2-8cca-11e5-845f-cbe485764f56.png)](https://cloud.githubusercontent.com/assets/776829/11199047/46dd4dd2-8cca-11e5-845f-cbe485764f56.png)

**Table of contents**

- [Usage](#usage)
    - [graph-composer show](#graph-composer-show)
    - [graph-composer export](#graph-composer-export)
- [Install](#install)
    - [As a phar (recommended)](#as-a-phar-recommended)
    - [Installation using Composer](#installation-using-composer)
- [Development](#development)
- [Tests](#tests)
- [License](#license)

Usage
-----

[](#usage)

Once clue/graph-composer is [installed](#install), you can use it via command line like this.

### graph-composer show

[](#graph-composer-show)

The `show` command creates a dependency graph for the given project path and opens the default desktop image viewer for you:

```
$ php graph-composer.phar show ~/path/to/your/project
```

- It accepts an optional argument which is the path to your project directory or composer.json file (defaults to checking the current directory for a composer.json file).
- You may optionally pass an `--format=[svg/svgz/png/jpeg/...]` option to set the image type (defaults to `svg`).

### graph-composer export

[](#graph-composer-export)

The `export` command works very much like the `show` command, but instead of opening your default image viewer, it will write the resulting graph to STDOUT or into an image file:

```
$ php graph-composer.phar export ~/path/to/your/project
```

- It accepts an optional argument which is the path to your project directory or composer.json file (defaults to checking the current directory for a composer.json file).
- It accepts an additional optional argument which is the path to write the resulting image to. Its file extension also sets the image format (unless you also explicitly pass the `--format` option). Example call:

    ```
    $ php graph-composer.phar export ~/path/to/your/project export.png
    ```

    If this argument is not given, it defaults to writing to STDOUT, which may be useful for scripting purposes:

    ```
    $ php graph-composer.phar export ~/path/to/your/project | base64
    ```
- You may optionally pass an `--format=[svg/svgz/png/jpeg/...]` option to set the image type (defaults to `svg`).

Install
-------

[](#install)

You can grab a copy of clue/graph-composer in either of the following ways.

This project aims to run on any platform and thus does not require any PHP extensions and supports running on legacy PHP 5.3 through current PHP 8+. It's *highly recommended to use the latest supported PHP version* for this project.

The graph drawing feature is powered by the excellent [GraphViz](https://www.graphviz.org)software. This means you'll have to install GraphViz (`dot` executable). The [Graphviz homepage](https://www.graphviz.org/download/) includes complete installation instructions for most common platforms, users of Debian/Ubuntu-based distributions may simply invoke:

```
$ sudo apt install graphviz
```

### As a phar (recommended)

[](#as-a-phar-recommended)

Once you have PHP and GraphViz installed, you can simply download a pre-packaged and ready-to-use version of this project as a Phar to any directory. You can simply download the latest `graph-composer.phar` file from our [releases page](https://github.com/clue/graph-composer/releases). The [latest release](https://github.com/clue/graph-composer/releases/latest) can always be downloaded like this:

```
$ curl -JOL https://clue.engineering/graph-composer-latest.phar
```

That's it already. Once downloaded, you can verify everything works by running this:

```
$ cd ~/Downloads
$ php graph-composer.phar --version
```

> If you prefer a global (system-wide) installation without having to type the `.phar` extension each time, you may simply invoke:
>
> ```
> $ chmod +x graph-composer.phar
> $ sudo mv graph-composer.phar /usr/local/bin/graph-composer
> ```
>
>
>
> You can verify everything works by running:
>
> ```
> $ graph-composer --version
> ```

There's no separate `update` procedure, simply download the latest release again and overwrite the existing phar.

### Installation using Composer

[](#installation-using-composer)

Alternatively, you can also install clue/graph-composer as part of your development dependencies. You will likely want to use the `require-dev` section to exclude clue/graph-composer in your production environment.

This method also requires PHP 5.3+, GraphViz and, of course, Composer.

You can either modify your `composer.json` manually or run the following command to include the latest tagged release:

```
$ composer require --dev clue/graph-composer
```

Now you should be able to invoke the following command in your project root:

```
$ ./vendor/bin/graph-composer show
```

Alternatively, you can install this globally for your user by running:

```
$ composer global require clue/graph-composer
```

Now, assuming you have `~/.composer/vendor/bin` in your path, you can invoke the following command:

```
$ graph-composer show ~/path/to/your/project
```

> Note: You should only invoke and rely on the main graph-composer bin file. Installing this project as a non-dev dependency in order to use its source code as a library is *not supported*.

To update to the latest release, just run `composer update clue/graph-composer`. If you installed it globally via composer you can run `composer global update clue/graph-composer` instead.

Development
-----------

[](#development)

clue/graph-composer is an [open-source project](#license) and encourages everybody to participate in its development. You're interested in checking out how clue/graph-composer works under the hood and/or want to contribute to the development of clue/graph-composer? Then this section is for you!

The recommended way to install clue/graph-composer is to clone (or download) this repository and use [Composer](https://getcomposer.org) to download its dependencies. Therefore you'll need PHP, Composer, GraphViz, git and curl installed. For example, on a recent Ubuntu/debian system, simply run:

```
$ sudo apt install php7.2-cli git curl graphviz

$ git clone https://github.com/clue/graph-composer.git
$ cd graph-composer

$ curl -s https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

$ composer install
```

You can now verify everything works by running clue/graph-composer like this:

```
$ php bin/graph-composer show
```

If you want to distribute clue/graph-composer as a single standalone release file, you may compile the project into a single `graph-composer.phar` file like this:

```
$ composer build
```

> Note that compiling will temporarily install a copy of this project to the local `build/` directory and install all non-development dependencies for distribution. This should only take a second or two if you've previously installed its dependencies already. The build script optionally accepts the version number (`VERSION` env) and an output file name or will otherwise try to look up the last release tag, such as `graph-composer-1.0.0.phar`.

You can now verify the resulting `graph-composer.phar` file works by running it like this:

```
$ ./graph-composer.phar --version
```

To update your development version to the latest version, just run this:

```
$ git pull
$ php composer.phar install
```

Made some changes to your local development version?

Make sure to let the world know! ![:shipit:](https://github.githubassets.com/images/icons/emoji/shipit.png ":shipit:")We welcome PRs and would love to hear from you!

Happy hacking!

Tests
-----

[](#tests)

To run the test suite, you first need to clone this repo and then install all dependencies [through Composer](https://getcomposer.org):

```
$ composer install
```

To run the test suite, go to the project root and run:

```
$ php vendor/bin/phpunit
```

License
-------

[](#license)

This project is released under the permissive [MIT license](LICENSE).

> Did you know that I offer custom development services and issuing invoices for sponsorships of releases and for contributions? Contact me (@clue) for details.

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance41

Moderate activity, may be stable

Popularity53

Moderate usage in the ecosystem

Community31

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

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

Every ~501 days

Recently: every ~627 days

Total

6

Last Release

2235d ago

Major Versions

v0.1.1 → v1.0.02015-11-17

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/776829?v=4)[Christian Lück](/maintainers/clue)[@clue](https://github.com/clue)

---

Top Contributors

[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (119 commits)")[![SimonFrings](https://avatars.githubusercontent.com/u/44357440?v=4)](https://github.com/SimonFrings "SimonFrings (4 commits)")[![elkuku](https://avatars.githubusercontent.com/u/33978?v=4)](https://github.com/elkuku "elkuku (2 commits)")[![PaulRotmann](https://avatars.githubusercontent.com/u/85174210?v=4)](https://github.com/PaulRotmann "PaulRotmann (2 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (1 commits)")[![xavismeh](https://avatars.githubusercontent.com/u/181753?v=4)](https://github.com/xavismeh "xavismeh (1 commits)")

---

Tags

dependency-graphvisualize dependenciesvisualize composer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/clue-graph-composer/health.svg)

```
[![Health](https://phpackages.com/badges/clue-graph-composer/health.svg)](https://phpackages.com/packages/clue-graph-composer)
```

###  Alternatives

[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

4743.5k10](/packages/phel-lang-phel-lang)[symfony/ai-bundle

Integration bundle for Symfony AI components

30282.3k6](/packages/symfony-ai-bundle)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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