# git-hour

> Briefly shows how much hours each contributor spent on a git repository

Latest version **2.0.1** (published 2026-02-17) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install git-hour
pnpm add git-hour
yarn add git-hour
bun add git-hour
```

Provides the command `git-hour`.

## Health

**Score 55/100 (C)** — status: stable.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2026-02-17 |
| First published | 2019-10-29 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Beeno Tung |
| Maintainers | beenotung |
| Keywords | git, cli-tool |

## Links

- npm: https://www.npmjs.com/package/git-hour
- Repository: https://github.com/beenotung/git-hour
- Homepage: https://github.com/beenotung/git-hour#readme
- Issues: https://github.com/beenotung/git-hour/issues
- npm.io page: https://npm.io/package/git-hour

## Dependencies (1)

- [@beenotung/tslib](https://npm.io/package/@beenotung/tslib.md) ^24.22.0

## Recent versions

- 2.0.1 (latest) — 2026-02-17
- 2.0.0 — 2026-02-17
- 1.0.1 — 2023-10-10
- 1.0.0 — 2023-02-05
- 0.0.3 — 2019-10-29
- 0.0.2 — 2019-10-29
- 0.0.1 — 2019-10-29

## README

# git-hour

Briefly shows how much hours each contributor spent on a git repository

[![npm Package Version](https://img.shields.io/npm/v/git-hour.svg?maxAge=2592000)](https://www.npmjs.com/package/git-hour)

## Usage Without Installation
```bash
npx git-hour [options] [directory]
```

## Installation (Optional)
```bash
# install with npm
npm i -g git-hour

# or install with pnpm
pnpm i -g git-hour

# ready to use
git-hour [options] [directory]
```

## Usage Options
```bash
# run under current git directory
git-hour

# run on specify directory
git-hour ~/workspace/github.com/beenotung/tslib

# show formatted table (Name | Email | Duration)
git-hour --format
git-hour -f ~/workspace/github.com/beenotung/tslib

# show help
git-hour --help
git-hour -h
```

## Todo
- [ ] Allow cli to customize duration of `maximum interval between commits in a session` and `minimum duration before initial commit in the session`
- [x] Use average interval in each session to adjust initial commit
- [ ] Adjust average interval by number of lines changed in the commit

## Similar works
- [git-time](https://github.com/vmf91/git-time) does not distinct each contributor
- [git-hours](https://github.com/kimmobrunfeldt/git-hours) ~~does not work with npx~~ (fixed in `1.5.0`) depends on the tricky nodegit

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