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.
# Using npm
npm install -g waistline
# Using pnpm
pnpm add -g waistline
# Using yarn
yarn global add waistline
waistline bmi --height 1.75 --weight 70
- Height in meters
- Weight in kilograms
waistline bmi --height 70 --weight 154 --imperial
- Height in inches
- Weight in pounds
waistline help
Calculate your Body Mass Index (BMI)
-
--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
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
- Node.js >= 18
# Clone the repository
git clone https://github.com/bittricky/death.git
cd waist-line
# Install dependencies
pnpm install
# Run locally
pnpm dev
-
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
MIT © Mitul Patel
A reimagining of the BMI calculator challenge on frontendmentor.io