An open API service indexing awesome lists of open source software.

https://github.com/bittricky/waist-line

Command line tool to calculate your Body Mass Index (BMI) πŸ‹οΈ
https://github.com/bittricky/waist-line

chalk cli javascript meow nodejs npm-package pnpm

Last synced: 4 months ago
JSON representation

Command line tool to calculate your Body Mass Index (BMI) πŸ‹οΈ

Awesome Lists containing this project

README

        

# Waist Line

> Those denim jeans collecting dust in your closet? No problem! With waistLine, you can calculate your BMI and take the first step toward better understanding of your health and fitness goalsβ€”because a healthy you is the best fit!

A command-line tool to calculate your Body Mass Index (BMI) with support for both metric and imperial units to get you started on your fitness journey.

## πŸš€ Installation

```bash
# Using npm
npm install -g waistline

# Using pnpm
pnpm add -g waistline

# Using yarn
yarn global add waistline
```

## πŸ“– Usage

### Calculate BMI using metric units (default)

```bash
waistline bmi --height 1.75 --weight 70
```

- Height in meters
- Weight in kilograms

### Calculate BMI using imperial units

```bash
waistline bmi --height 70 --weight 154 --imperial
```

- Height in inches
- Weight in pounds

### Get help

```bash
waistline help
```

## πŸ› οΈ Available Commands

### `bmi`

Calculate your Body Mass Index (BMI)

#### Options:

- `--height, -h`: Your height (in meters or inches)
- `--weight, -w`: Your weight (in kilograms or pounds)
- `--imperial, -i`: Use imperial units (height in inches, weight in pounds)
- `--clear, -c`: Clear the console
- `--debug, -d`: Print debug info

## πŸ“Š BMI Categories

The tool categorizes your BMI into one of these ranges:

- Underweight: < 18.5
- Normal weight: 18.5 - 24.9
- Overweight: 25 - 29.9
- Obese: β‰₯ 30

## πŸ”§ Development

### Prerequisites

- Node.js >= 18

### Setup

```bash
# Clone the repository
git clone https://github.com/bittricky/death.git
cd waist-line

# Install dependencies
pnpm install

# Run locally
pnpm dev
```

### Available Scripts

- `pnpm dev`: Run the CLI locally
- `pnpm start`: Run the CLI
- `pnpm format`: Format code using Prettier
- `pnpm publish:patch`: Publish a patch version
- `pnpm publish:minor`: Publish a minor version
- `pnpm publish:major`: Publish a major version

## πŸ“ License

MIT Β© [Mitul Patel](https://mitulpa.tel)

A reimagining of the BMI calculator challenge on [frontendmentor.io](https://frontendmentor.io)