PHPackages                             sagautam5/composer-insights - 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. sagautam5/composer-insights

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

sagautam5/composer-insights
===========================

CLI tool to audit and analyze your composer dependencies.

v1.0.0(1y ago)25MITPHPPHP ^8.2CI passing

Since Jun 29Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/sagautam5/composer-insights)[ Packagist](https://packagist.org/packages/sagautam5/composer-insights)[ RSS](/packages/sagautam5-composer-insights/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (2)Used By (0)

📦 Composer Insights
===================

[](#-composer-insights)

[![GitHub stars](https://camo.githubusercontent.com/5c2c85336ed9e883878272467c934c2c5b5d21d92490e8b26a5cdd3179a3d982/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f736167617574616d352f636f6d706f7365722d696e7369676874733f7374796c653d736f6369616c)](https://github.com/sagautam5/composer-insights/stargazers)[![Latest Stable Version](https://camo.githubusercontent.com/ff01c858e44739f640bb25d9d1dbd7a88d87c41f49312ed387024f92cbbd630f/68747470733a2f2f706f7365722e707567782e6f72672f736167617574616d352f636f6d706f7365722d696e7369676874732f76)](//packagist.org/packages/sagautam5/composer-insights)[![Total Downloads](https://camo.githubusercontent.com/a1ec9db3801241d321b88fbb74dd1d3d90a40514c011678c63721a43ae0cc8fe/68747470733a2f2f706f7365722e707567782e6f72672f736167617574616d352f636f6d706f7365722d696e7369676874732f646f776e6c6f616473)](//packagist.org/packages/sagautam5/composer-insights)[![Issues](https://camo.githubusercontent.com/07c7ac0ee2ebd0b33c02baeccb114dad9fdde0f84ba7a4e32419c5570aa0ee7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f736167617574616d352f636f6d706f7365722d696e736967687473)](https://camo.githubusercontent.com/07c7ac0ee2ebd0b33c02baeccb114dad9fdde0f84ba7a4e32419c5570aa0ee7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f736167617574616d352f636f6d706f7365722d696e736967687473)[![Forks](https://camo.githubusercontent.com/7a4766fe83a7c8559d33efe35110250756f9bb36b440a550090748c288b77c7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f736167617574616d352f636f6d706f7365722d696e736967687473)](https://github.com/sagautam5/composer-insights/network/members)[![GitHub Actions Status](https://github.com/sagautam5/composer-insights/actions/workflows/ci.yml/badge.svg)](https://github.com/sagautam5/composer-insights/actions/workflows/ci.yml)

**Composer Insights** is a CLI tool that analyzes your PHP project's composer dependencies and provides insightful GitHub and Packagist statistics for each top-level dependency.

---

✨ Features
----------

[](#-features)

- 🔍 Analyze direct dependencies from composer
- ⭐ Fetch GitHub repository data: stars, forks, open issues, last update
- 📈 Get download stats from Packagist
- 🧹 Clean tabular output in the terminal
- 🛑 Gracefully skips non-GitHub packages
- ⚡ Fast, dependency-free CLI experience
- 📊 Clean color-coded analysis summary

---

💡Example Output
---------------

[](#example-output)

```
vendor\bin\composer-insights analyze
```

[![Sample Console Output](./images/SampleOutput.png)](./images/SampleOutput.png)
--------------------------------------------------------------------------------

[](#)

### Exports

[](#exports)

##### JSON

[](#json)

```
vendor\bin\composer-insights analyze --export=json
```

JSON file will be exported to `.composer-insights/output/data.json` by default

[Sample JSON Output](./exports/data.json)

##### CSV

[](#csv)

---

```
vendor\bin\composer-insights analyze --export=csv
```

CSV file will be exported to `.composer-insights/output/data.csv` by default

[Sample CSV Output](./exports/data.csv)

---

📋 Requirements
--------------

[](#-requirements)

- PHP 8.2 or higher
- A Composer-based project
- Internet connection

---

📥 Installation
--------------

[](#-installation)

You can install it in any Composer-based local PHP project as dev dependency:

```
composer require sagautam5/composer-insights --dev
```

Make sure your project has both `composer.json` and `composer.lock` files.

To avoid GitHub API rate limits and to enable access to public repositories, set your GitHub token as an environment variable:

```
export GITHUB_TOKEN=your_github_token
```

You can generate a personal access token from

📸 Screenshots
-------------

[](#-screenshots)

**Classic Token Option**

[![Classic Token Option](./images/ClassicTokenOption.png)](./images/ClassicTokenOption.png)

**Privillages For Token**

[![Privillages For Token](./images/GenerateClassicToken.png)](./images/GenerateClassicToken.png)

---

🧪 Usage
-------

[](#-usage)

Run the following command to start the analysis:

```
vendor/bin/composer-insights analyze
```

🔧 Command Options for `analyze`
-------------------------------

[](#-command-options-for-analyze)

Here are the available options for the `analyze` command:

OptionDescription`--days=180`*(Optional)* Number of days to look back for health check (default: 180).`--dev`Include only development dependencies in the analysis.`--prod`Include only production dependencies in the analysis.`--export=FORMAT`Export results to a file. Accepts `json` or `csv`.`--no-summary`Do not show summary statistics in the console output.`--no-table`Do not show the table view in the console output.`--no-cache`Fetch fresh dependency insights without using cached data.By default, all dependencies (both production and development) will be analyzed.

---

### 🛠️ What This Command Does

[](#️-what-this-command-does)

- Parses your `composer.json` and `composer.lock`
- Analyzes only **direct dependencies** (ignores transitive)
- Fetches GitHub and Packagist stats
- Displays a clean, color-coded CLI table
- Displays a clean, color-coded summary
- Caches the insights collected for each package in json

🪪 License
---------

[](#-license)

This package is open-sourced under the [MIT License](LICENSE).

---

🔐 Security
----------

[](#-security)

If you discover a security vulnerability within this package, please send an e-mail to , All security vulnerabilities will be promptly addressed.

🤝 Contributing
--------------

[](#-contributing)

Want to contribute to Composer Insights ? Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.

We welcome all contributions, whether it's:

- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer

---

### 🙌 Contributors

[](#-contributors)

- [Sagar Gautam](https://github.com/sagautam5) – Creator &amp; Maintainer
- **ALL Contributors**

---

Enjoy analyzing your dependencies! 🎉

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance50

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

369d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10434281?v=4)[Sagar Gautam](/maintainers/sagautam5)[@sagautam5](https://github.com/sagautam5)

---

Top Contributors

[![sagautam5](https://avatars.githubusercontent.com/u/10434281?v=4)](https://github.com/sagautam5 "sagautam5 (56 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/sagautam5-composer-insights/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)[lion/bundle

Lion-framework configuration and initialization package

122.3k4](/packages/lion-bundle)

PHPackages © 2026

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