waist-line
v1.0.0
Published
Command line tool to calculate your BMI
Downloads
11
Maintainers
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
# 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)
waistline bmi --height 1.75 --weight 70- Height in meters
- Weight in kilograms
Calculate BMI using imperial units
waistline bmi --height 70 --weight 154 --imperial- Height in inches
- Weight in pounds
Get help
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
# Clone the repository
git clone https://github.com/bittricky/death.git
cd waist-line
# Install dependencies
pnpm install
# Run locally
pnpm devAvailable Scripts
pnpm dev: Run the CLI locallypnpm start: Run the CLIpnpm format: Format code using Prettierpnpm publish:patch: Publish a patch versionpnpm publish:minor: Publish a minor versionpnpm publish:major: Publish a major version
📝 License
MIT © Mitul Patel
A reimagining of the BMI calculator challenge on frontendmentor.io
