Installation and Setup - Sydefix/habit-tracker GitHub Wiki

Follow these steps to get the Habit Tracker CLI running on your system.

Prerequisites

  • Python 3.8 or newer

Step-by-Step Guide

1. Clone the Repository

Open your terminal and clone the repository.

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

2. Create and Activate a Virtual Environment

Setup the environment.

  • On macOS / Linux:
python3 -m venv venv
source venv/bin/activate
  • On Windows:
python -m venv venv
.\venv\Scripts\activate

3. Install Dependencies

The project's dependencies are listed in the pyproject.toml file following modern standards in python packaging.

  • Development Environment
pip install -e ".[dev]"

This will install SQLAlchemy, click, and pytest.

  • Production environment
pip install -e .

This will install SQLAlchemy and click, but it will not install pytest and its dependencies.

4. Verify the Installation

You can verify that the application is set up correctly by running the main script with the --help flag. This will also create your initial production_habits.db file.

habit --help

You should see a list of available commands. Congratulations, you are ready to start tracking your habits!

Next Step: Head over to the User Guide: Command-Line Usage to learn how to use the application.