Track your daily habits, visualize streaks, and export to CSV — all from your terminal.
Habit Streak Tracker is a simple yet powerful terminal-based habit tracking tool. Log daily completions, visualize your streaks with emoji fire indicators, track your longest streaks, and export everything to CSV for deeper analysis.
Perfect for:
- Building new habits
- Tracking daily routines
- Maintaining fitness goals
- Monitoring study schedules
- Personal productivity
No dependencies required! Just clone and run:
git clone https://github.com/yourusername/habit-tracker.git
cd habit-trackerpython main.py add exercise# Track today's completion
python main.py track exercise
# Track for a specific date
python main.py track exercise 2026-06-20python main.py listpython main.py export habits.csv| Command | Description | Example |
|---|---|---|
add <name> |
Add a new habit | python main.py add meditation |
track <name> [date] |
Log a completion | python main.py track exercise |
untrack <name> [date] |
Remove a tracking entry | python main.py untrack exercise 2026-06-25 |
delete <name> |
Delete a habit entirely | python main.py delete exercise |
list |
Show all habits with stats | python main.py list |
export [filename] |
Export data to CSV | python main.py export data.csv |
help |
Show help message | python main.py help |
The list command shows:
- Current Streak: 🔥🔥🔥 (3 days) — visual fire indicator
- Longest Streak: Total consecutive days achieved
- Total Days: All-time completions
- Completion Rate: Percentage of active days
- 30-Day Calendar: Visual grid showing completed (🟢) vs missed (⚪) days
╔══════════════════════════════════════════════════════════════════╗
║ 🎯 HABIT TRACKER ║
╚══════════════════════════════════════════════════════════════════╝
📌 EXERCISE
Current Streak: 🔥🔥🔥🔥🔥🔥🔥🔥 (8 days)
Longest Streak: 14 days
Total Days: 23
Completion Rate: 65.7%
Last 30 Days:
Mo 1 🟢
🟢
🟢
Tu 2 🟢
⚪
🟢
We 3 🟢
🟢
⚪
...
──────────────────────────────────────────────────────────────────
All data is stored locally in habits.json:
{
"habits": {
"exercise": {
"created": "2026-06-01T10:00:00",
"logs": {
"2026-06-01": true,
"2026-06-02": true,
"2026-06-03": true
}
}
}
}Export format:
habit,date,completed
exercise,2026-06-01,True
exercise,2026-06-02,True
meditation,2026-06-01,TrueContributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Add reminder notifications
- Implement weekly/monthly reports
- Add habit categories/tags
- Create a web dashboard
- Support multiple users
- Add Pomodoro timer integration
This project is licensed under the MIT License — see the LICENSE file for details.
Found this useful? Give it a ⭐ on GitHub!
Built with ❤️ by the community.