caltrack is a simple command-line tool to help you track your daily intake of protein and calories. It automatically resets your intake data at midnight, ensuring that you always have an accurate record of your daily consumption.
- Track protein and calorie intake easily through the command line.
- Automatically resets daily intake at midnight.
- Lightweight and minimal dependencies.
-
Clone the repository:
git clone https://github.com/LucasWanJZ/caltrack.git cd caltrack
-
Ensure that you have Python 3 installed
-
Make the script executable
chmod +x caltrack.py
-
Optionally, add the script to your PATH for easier access:
sudo mv caltrack.py /usr/local/bin/caltrack
Command allows you to track your protein and calorie intake across different meals (breakfast, lunch, and dinner). You can add new amounts, view current totals, and reset data as needed.
caltrack <command> [amount] [--m <meal>] [--n <nutrient>]
protein
: track or display protein intakecalorie
: track or display calorie intakemeals
: show the current intake of protein and calorie of a specific mealreset
: reset nutrient data (eitherprotein
,calorie
or both)
amount
: The amount of protein (in grams) or calorie (in kcal) to add.--m
: specify the meal to add or show data for. REQUIRED FOR ALL COMMANDS EXCEPTreset
. {breakfast
,lunch
,dinner
}--n
: specify the nutrient to reset. {protein
,calorie
}
caltrack protein 30 --m breakfast
Added 30g of protein to your breakfast
caltrack protein 2.4*2.5 --m lunch
2.4*2.5g of protein will be calculated first, then add to your lunch.
caltrack calorie 400 --m dinner
Added 400kcal to your dinner
caltrack protein
caltrack calorie
caltrack meals --m breakfast
view breakfast's nutrient data
caltrack reset --n protein
reset protein data
caltrack reset
reset all data
- Reset Calorie and Protein Intake ✅
- Able to show breakfast, lunch and dinner's intakes ✅
- Able to use mathematic expressions as amount input ✅
- Export to a file