Skip to content

dcz6360/habit-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Habit Streak Tracker

Track your daily habits, visualize streaks, and export to CSV — all from your terminal.

Python 3.8+ License: MIT Stars

✨ Overview

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

📦 Installation

No dependencies required! Just clone and run:

git clone https://github.com/yourusername/habit-tracker.git
cd habit-tracker

🚀 Quick Start

Add your first habit

python main.py add exercise

Track a habit

# Track today's completion
python main.py track exercise

# Track for a specific date
python main.py track exercise 2026-06-20

View your progress

python main.py list

Export to CSV

python main.py export habits.csv

🎯 Commands

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

📊 Stats & Visualization

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

Example Output

╔══════════════════════════════════════════════════════════════════╗
║                      🎯 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  🟢
           🟢
           ⚪
     ...

  ──────────────────────────────────────────────────────────────────

💾 Data Storage

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
      }
    }
  }
}

📤 CSV Export

Export format:

habit,date,completed
exercise,2026-06-01,True
exercise,2026-06-02,True
meditation,2026-06-01,True

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Ideas for improvement:

  • Add reminder notifications
  • Implement weekly/monthly reports
  • Add habit categories/tags
  • Create a web dashboard
  • Support multiple users
  • Add Pomodoro timer integration

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

🔗 Links

💬 Support

Found this useful? Give it a ⭐ on GitHub!

Built with ❤️ by the community.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages