# fchurn

> File churn metric generator for projects using Git

Latest version **1.2.1** (published 2021-02-18) · MPL-2.0 license · 0 weekly downloads

## Install

```sh
npm install fchurn
pnpm add fchurn
yarn add fchurn
bun add fchurn
```

Provides the command `fchurn`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2021-02-18 |
| First published | 2019-11-04 |
| Weekly downloads | 0 |
| License | MPL-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Chris Stead |
| Maintainers | cmstead |
| Keywords | "file, churn", "code, metrics", utilities |

## Links

- npm: https://www.npmjs.com/package/fchurn
- Repository: https://github.com/cmstead/fchurn
- Homepage: https://github.com/cmstead/fchurn#readme
- Issues: https://github.com/cmstead/fchurn/issues
- npm.io page: https://npm.io/package/fchurn

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.24.0

## Recent versions

- 1.2.1 (latest) — 2021-02-18
- 1.2.0 — 2019-11-05
- 1.1.0 — 2019-11-04
- 1.0.0 — 2019-11-04

## README

# FChurn #

File churn is a great way to see that a part of your application might be modified too often.  This can indicate issues like a "god module/class" or logical pieces are too tightly coupled, making the software harder to change over time.

FChurn (File Churn) helps get a quick read on which files are seeing the most development and which are being created and then left alone.

## Setup ##

Be sure you have a current version of Node.js installed.

To install:

`npm install -g fchurn`

## Usage ##

Open a terminal window (terminal, powershell, cmd.exe, etc.) in a folder containing a git repository.

Run: `fchurn`.

For a full list of options, run `fchurn --help`.

## Help Output ##

fchurn [--help][--flag value]

Flag options:

- fileName
    - Value: file name string
    - Description: Get the churn for all files matching file name string

- help
    - Value: none
    - Description: display help info

- json
    - Value: none
    - Description: Display churn metrics in JSON format

- showTop
    - Value: Number of churn records to show
    - Description: Show the top X churned files

- snapshotDayCount
    - Value: Number of days to include in the churn snapshot
    - Description: Build a churn snapshot of the past X days

Examples:
---------

Show the 10 files with the highest churn over the last 30 days

`fchurn --showTop 10 --snapshotDayCount 30`

Show the churn of the package file over the past year

`fchurn --fileName "package.json" --snapshotDayCount 365`

---
_Source: https://npm.io/package/fchurn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
