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

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

srmilon/graph-composer
======================

Dependency graph visualization for composer.json

v1.0.0(10y ago)011MITPHP

Since May 15Pushed 8y ago1 watchersCompare

[ Source](https://github.com/milonfci/graph-composer)[ Packagist](https://packagist.org/packages/srmilon/graph-composer)[ Docs](https://github.com/clue/graph-composer)[ RSS](/packages/srmilon-graph-composer/feed)WikiDiscussions master Synced 3d ago

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

clue/graph-composer [![Build Status](https://camo.githubusercontent.com/3ecfd86d21eb11d5ed769de75e3f4bfb4520d45ed0e2eebd877570e11ae22d1e/68747470733a2f2f7472617669732d63692e6f72672f636c75652f67726170682d636f6d706f7365722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/clue/graph-composer)
============================================================================================================================================================================================================================================================================================================

[](#cluegraph-composer-)

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

[![dependency graph for 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)
        - [Updating phar](#updating-phar)
    - [Installation using Composer](#installation-using-composer)
        - [Updating dependency](#updating-dependency)
    - [Manual Installation from Source](#manual-installation-from-source)
        - [Updating manually](#updating-manually)
- [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.

### As a phar (recommended)

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

You can simply download a pre-compiled and ready-to-use version as a Phar to any directory. Simply download the latest `graph-composer.phar` file from our [releases page](https://github.com/clue/graph-composer/releases):

[Latest release](https://github.com/clue/graph-composer/releases/latest)

Additionally, you'll have to install GraphViz (`dot` executable). Users of Debian/Ubuntu-based distributions may simply invoke:

```
$ sudo apt-get install graphviz
```

Windows users have to [download GraphViZ for Windows](http://www.graphviz.org/Download_windows.php) and remaining users should install from [GraphViz homepage](http://www.graphviz.org/Download.php).

That's it already. You can now 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 0755 graph-composer.phar
> $ sudo mv graph-composer.phar /usr/local/bin/graph-composer
> ```
>
>
>
> You can verify everything works by running:
>
> ```
> $ graph-composer --version
> ```

#### Updating phar

[](#updating-phar)

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 graph-composer as part of your development dependencies. You will likely want to use the `require-dev` section to exclude 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*.

#### Updating dependency

[](#updating-dependency)

Just run `composer update clue/graph-composer` to update to the latest release.

If you installed it globally via composer you can run `composer global update clue/graph-composer` instead.

### Manual Installation from Source

[](#manual-installation-from-source)

This project requires PHP 5.3+, Composer and GraphViz:

```
$ sudo apt-get install php5-cli graphviz
$ git clone https://github.com/clue/graph-composer.git
$ cd graph-composer
$ curl -s https://getcomposer.org/installer | php
$ php composer.phar install
```

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

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

> If you want to build the above mentioned `graph-composer.phar` yourself, you have to install [clue/phar-composer](https://github.com/clue/phar-composer#install)and can simply invoke:
>
> ```
> $ php phar-composer.phar build ~/workspace/graph-composer
> ```

#### Updating manually

[](#updating-manually)

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

License
-------

[](#license)

MIT

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 92.9% 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 ~229 days

Total

5

Last Release

3832d ago

Major Versions

v0.1.1 → v1.0.02015-11-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/1d2f1a6bafa57ced4ffb9cabcb167d5bb696ff997b207292a3203456aba83e50?d=identicon)[milonfci](/maintainers/milonfci)

---

Top Contributors

[![clue](https://avatars.githubusercontent.com/u/776829?v=4)](https://github.com/clue "clue (79 commits)")[![elkuku](https://avatars.githubusercontent.com/u/33978?v=4)](https://github.com/elkuku "elkuku (2 commits)")[![milonfci](https://avatars.githubusercontent.com/u/1906970?v=4)](https://github.com/milonfci "milonfci (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

### Embed Badge

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

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

###  Alternatives

[clue/graph-composer

Dependency graph visualization for composer.json

93798.0k11](/packages/clue-graph-composer)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4723.6M20](/packages/coenjacobs-mozart)[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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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