README.md

# CHR

CHR(Command History Report): A command history report tool base on your shell history file.

> Your data is yours.

[![Hex.pm version](https://img.shields.io/hexpm/v/chr.svg)](https://hex.pm/packages/chr)
[![Twitter: ThaddeusJiang](https://img.shields.io/twitter/follow/ThaddeusJiang.svg?style=social)](https://twitter.com/ThaddeusJiang)

> Inspired by the Fig report, this tool aims to provide a similar experience for those not using Fig.

![Fig 2022 Wrapped](https://pbs.twimg.com/media/FkqSV8hXoAEXqON?format=png&name=small)

## Features

- πŸ†Top Commands
- πŸ“‚Top Directories
- πŸ’¦Busiest Day
- πŸ“…Weekly Activity
- πŸ•™Daily Activity

## Requirements

- [Elixir](https://elixir-lang.org/install.html)

```sh
brew install elixir
```

## Usage

```sh
mix escript.install hex chr

chr
```

## Report Example

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                             β”‚
β”‚  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—                            β”‚
β”‚  β–ˆβ–ˆβ•”β•β•β•β•β•    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—                           β”‚
β”‚  β–ˆβ–ˆβ•‘         β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘    β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•                           β”‚
β”‚  β–ˆβ–ˆβ•‘         β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—                           β”‚
β”‚  β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘                           β”‚
β”‚   β•šβ•β•β•β•β•β•    β•šβ•β•  β•šβ•β•    β•šβ•β•  β•šβ•β•  Commands History Report  β”‚
β”‚                                                             β”‚
β”‚  Made with ❀️ by ThaddeusJiang                               β”‚
β”‚  source code: https://github.com/ThaddeusJiang/chr          β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€πŸ† Top Commands────┐
β”‚                    β”‚
β”‚  810 git           β”‚
β”‚  276 cd            β”‚
β”‚  183 code          β”‚
β”‚  150 mix           β”‚
β”‚  111 ls            β”‚
β”‚  93 clear          β”‚
β”‚  63 docker         β”‚
β”‚  59 npm            β”‚
β”‚  49 k6             β”‚
β”‚  45 ./gitlab_cli   β”‚
β”‚                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€πŸ“‚ Top Directories──────────┐
β”‚                             β”‚
β”‚  36 git/work/plugo          β”‚
β”‚  24 repos/backend           β”‚
β”‚  16 repos/roaming-gateway   β”‚
β”‚  14 git/ThaddeusJiang       β”‚
β”‚  13 repos/k8s               β”‚
β”‚                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€πŸ’¦ Busiest Day───────────────┐
β”‚                              β”‚
β”‚  372 commands on 2024-02-19  β”‚
β”‚                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€πŸ“… Weekly Activity─────────┐
β”‚                            β”‚
β”‚  Mon                       β”‚
β”‚  Tue β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“  β”‚
β”‚  Wed β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“      β”‚
β”‚  Thu β–“β–“β–“β–“β–“β–“β–“               β”‚
β”‚  Fri β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“           β”‚
β”‚  Sat β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“            β”‚
β”‚  Sun β–“                     β”‚
β”‚                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ”€πŸ•‘ Daily Activity─────────┐
β”‚                           β”‚
β”‚  01                       β”‚
β”‚  02                       β”‚
β”‚  03                       β”‚
β”‚  04                       β”‚
β”‚  05 β–“                     β”‚
β”‚  06 β–“β–“                    β”‚
β”‚  07 β–“                     β”‚
β”‚  08                       β”‚
β”‚  09                       β”‚
β”‚  10 β–“                     β”‚
β”‚  11 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“  β”‚
β”‚  12 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“            β”‚
β”‚  13 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“           β”‚
β”‚  14 β–“β–“β–“β–“β–“β–“β–“β–“β–“             β”‚
β”‚  15 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“         β”‚
β”‚  16 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“   β”‚
β”‚  17 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“            β”‚
β”‚  18 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“          β”‚
β”‚  19 β–“β–“β–“β–“β–“β–“β–“β–“              β”‚
β”‚  20 β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“β–“           β”‚
β”‚  21 β–“β–“β–“β–“β–“β–“β–“               β”‚
β”‚  22 β–“β–“β–“β–“β–“β–“                β”‚
β”‚  23 β–“β–“β–“β–“β–“                 β”‚
β”‚  24 β–“                     β”‚
β”‚                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

## Author

πŸ‘€ **Thaddeus Jiang**

- Website: https://thaddeusjiang.com/
- Twitter: [@ThaddeusJiang](https://twitter.com/ThaddeusJiang)
- Github: [@ThaddeusJiang](https://github.com/ThaddeusJiang)

## Acknowledgement

This has been possible due to the previous work of numerous people. In particular:

- @borkdude - Author of babashka, thanks for helping me remove the manual data preparation requirement

## Show your support

Give a ⭐️ if this project helped you!

---

_This README was generated with ❀️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_