PHPackages                             mitoteam/mt-howmany - 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. mitoteam/mt-howmany

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

mitoteam/mt-howmany
===================

Command-line utility to count project sources size, files count, lines count

v1.4.0(1y ago)33.6k↓28.6%MITPHPPHP &gt;=7.0

Since Jun 15Pushed 1y agoCompare

[ Source](https://github.com/mitoteam/mt-howmany)[ Packagist](https://packagist.org/packages/mitoteam/mt-howmany)[ Docs](https://github.com/mitoteam/mt-howmany)[ RSS](/packages/mitoteam-mt-howmany/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (3)Versions (9)Used By (0)

mt-howmany
==========

[](#mt-howmany)

[![GitHub Version](https://camo.githubusercontent.com/1f796394c5d7cbe47fd22074f3c5fb06deca04d6c845087e90c6cd475fe8df73/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d69746f7465616d2f6d742d686f776d616e793f7374796c653d666c61742d737175617265266c6f676f3d676974687562)](https://github.com/mitoteam/mt-howmany)[![Packagist Version](https://camo.githubusercontent.com/a3d97307a80943a443bb7518b3258ca3af791d209a3e34227ae262032f96e3ac/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69746f7465616d2f6d742d686f776d616e793f696e636c7564655f70726572656c6561736573267374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/mitoteam/mt-howmany)[![Packagist PHP Version Support](https://camo.githubusercontent.com/669e4041f61ac28e48313c7c207bb4963ec9da5904612aa99b78ba9b1233e99d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d69746f7465616d2f6d742d686f776d616e793f7374796c653d666c61742d737175617265266c6f676f3d706870)](https://github.com/mitoteam/mt-howmany)[![Packagist Total Downloads](https://camo.githubusercontent.com/9f88fe555618b3e56a5273ef49ed31777b0f0d4d2f57ec978759666cd5a8c737/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69746f7465616d2f6d742d686f776d616e793f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mitoteam/mt-howmany/stats)[![Packagist Monthly Downloads](https://camo.githubusercontent.com/7bdf1cc81d6f1b025bd7e024df81e15535b98dd8e2796c5080a7ed1fddf979ef/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6d69746f7465616d2f6d742d686f776d616e793f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mitoteam/mt-howmany/stats)

[![](https://github.com/mitoteam/mt-howmany/raw/main/graphics/logo.png)](https://github.com/mitoteam/mt-howmany/blob/main/graphics/logo.png)

Command-line utility to measure project sources size, files count, lines count, characters count. You can exclude vendor libraries, binary files, generated code and so from scanning.

Our goal was to understand how many code characters, lines and pages were written by our own hands for various projects.

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

[](#installation)

Just add it as usual composer dependency:

```
composer require mitoteam/mt-howmany

```

Or you can add dependency manually to your `composer.json`.

Usage
-----

[](#usage)

Tool installs standard composer binary to vendor/bin/mt-howmany. So you can run it by just calling it from shell:

```
vendor/bin/mt-howmany

```

or under Windows:

```
vendor\bin\mt-howmany.bat

```

It looks for config in current directory. By default it scans currenct directory recursively, but you can set specific paths to scan in config. There are also bunch of options in config.

You can import config from other files with `import` option (for example to have some common parts between projects).

Take a look at sample config for details: [mt-howmany.example.yml](mt-howmany.example.yml)

For each file that is not ignored in config tool calculates lines count, file size and characters count (using `symphony/string` to deal with Unicode and multi-byte characters).

After scanning it prints table with gathered data and final total numbers for whole project.

You can add `-v` or `-vv` arguments to increase output verbosity.

`-v` add per-path statistics table (helps to understand what to exclude from scanning to left only code that is trully yours).

`-vv` additionally prints complete data for each file to understand even better where numbers are taken from.

`--single` option turns on 'single value mode'. Program will print just one value without any other output (if there are no errors). This is useful for CI, automation and so on. Possible option values: `CHARS`, `LINES`, `PAGES`. Example:

```
mt-howmany --single=LINES

```

Notes, bugreports, proposals and pull requests are always welcomed.

Output Example
--------------

[](#output-example)

```
mt-howmany by MiTo Team
=======================

Working directory: /www/binardo.mt.test
Config file loaded: /www/binardo.mt.test/web/modules/custom/mtlapbase/mt-howmany.common.yml
Config file loaded: /www/binardo.mt.test/mt-howmany.yml

Results by file extension
=========================

 ----------- -------- ------------ ------------- -------
  Type        Size     Characters   Files Count   Lines
 ----------- -------- ------------ ------------- -------
  php         777Kb    782756       174           32225
  twig        50.0Kb   51145        26            1471
  scss        29.8Kb   30464        47            1886
  js          17.1Kb   17276        11            637
  yml         15.5Kb   15767        18            621
  sh          9.59Kb   9816         11            348
  po          3.69Kb   2965         1             164
  json        3.27Kb   3344         4             127
  module      3.10Kb   3176         2             131
  theme       3.06Kb   3133         2             123
  gitignore   2.23Kb   2280         2             82
  md          2.08Kb   1323         6             38
  txt         139      139          1             8
  htaccess    38       38           2             4
 ----------- -------- ------------ ------------- -------

Totals
======

Types count: 14
Paths count: 67
Files count: 307
Size: 916Kb
Characters: 923622
Lines: 37865
Pages by Characters: 257
Pages by Lines: 1052

```

- Project Page:
- Contacts: ,

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance45

Moderate activity, may be stable

Popularity25

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Every ~143 days

Recently: every ~251 days

Total

8

Last Release

427d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9feed51e3e8721770ad2e76ba32834efe5504622c974e398e0ee2725b7bd0259?d=identicon)[f1mishutka](/maintainers/f1mishutka)

---

Top Contributors

[![f1mishutka](https://avatars.githubusercontent.com/u/24731190?v=4)](https://github.com/f1mishutka "f1mishutka (40 commits)")

### Embed Badge

![Health badge](/badges/mitoteam-mt-howmany/health.svg)

```
[![Health](https://phpackages.com/badges/mitoteam-mt-howmany/health.svg)](https://phpackages.com/packages/mitoteam-mt-howmany)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[crunzphp/crunz

Schedule your tasks right from the code.

2292.0M6](/packages/crunzphp-crunz)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[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)

PHPackages © 2026

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