Skip to main content

A small cross-platform habit tracker CLI with a polished interactive shell.

Project description

habit_tracker_cli

habit_tracker_cli is a small cross-platform habit tracker for the terminal. It keeps the command-line workflow simple, stores data locally in SQLite, and includes a lightweight interactive shell for day-to-day use.

Public command:

habit-tracker

Features

  • Add daily habits or habits scheduled on specific weekdays
  • Mark habits as done for today
  • Show habits due today
  • Check the current streak for one habit
  • Show a weekly report
  • Use an interactive shell with help, manual pages, and tab completion
  • Clear local app data safely with clear-data

Installation

Windows

Recommended: pipx from PowerShell or Windows Terminal. pipx keeps the app isolated and avoids cluttering the main Python environment.

Install from source today:

pipx install .

Future PyPI install target:

pipx install habit-tracker-cli

Linux

Recommended: pipx.

Install from source today:

pipx install .

Future PyPI install target:

pipx install habit-tracker-cli

Development install from source

pip install -e .[dev]
python -m pytest

Usage

habit-tracker add "Read 20 min" --daily
habit-tracker add "Go to the gym" --days mon,wed,fri
habit-tracker list
habit-tracker today
habit-tracker done "Read 20 min"
habit-tracker streak "Read 20 min"
habit-tracker report
habit-tracker report --week

report and report --week are equivalent in the current version.

Interactive shell

Start it explicitly:

habit-tracker shell

Running habit-tracker with no subcommand also enters the shell.

Prompt:

habit>

Shell commands:

  • add
  • list
  • today
  • done
  • streak
  • report
  • help
  • man
  • clear
  • clear-data
  • exit
  • q

Data storage

The app uses platformdirs for predictable per-user storage.

Typical locations:

OS Data location
Windows %LOCALAPPDATA%\habit_tracker_cli\
Linux $XDG_DATA_HOME/habit_tracker_cli/ or ~/.local/share/habit_tracker_cli/

Shell state and history live in the matching per-user state/config directories for the same app name.

Optional overrides:

HABIT_TRACKER_DB_PATH=/custom/path/habit_tracker.db
HABIT_TRACKER_HOME=/custom/app-home

Clear app data

habit-tracker clear-data
habit-tracker clear-data --yes

clear-data shows the exact paths it plans to remove and asks for confirmation unless --yes is used.

Uninstall

If you installed with pipx:

pipx uninstall habit-tracker-cli

If you installed from source in editable mode:

pip uninstall habit_tracker_cli

There is intentionally no built-in self-uninstall command. Uninstall remains a manual step for safety.

GitHub and PyPI readiness

The repository is set up for GitHub publication now and for straightforward future PyPI publication later.

Suggested future release flow:

python -m build
python -m twine check dist/*

When PyPI trusted publishing is configured, releases can be connected to an upload workflow. Until then, manual publishing is the safest option.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

habit_tracker_cli-0.1.0.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

habit_tracker_cli-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file habit_tracker_cli-0.1.0.tar.gz.

File metadata

  • Download URL: habit_tracker_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for habit_tracker_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c221b62037ad0fe44e2bb169530c6e82c304e0613d2d7f4e75cb50c9f715db0e
MD5 db9d0df25f62e53d64836987cf5ea58d
BLAKE2b-256 769f0d1ecb3fce47ad8d58e9f34baf5851e679ccb7703b7782fec418b9908771

See more details on using hashes here.

Provenance

The following attestation bundles were made for habit_tracker_cli-0.1.0.tar.gz:

Publisher: publish-pypi.yml on Luis696969/habit-tracker-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file habit_tracker_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for habit_tracker_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80edb393879572b3eebf0a18f1b460636374fe9b882a314a522b78b098057803
MD5 c1db93d60c4a9c0a7c650b0a6d776a29
BLAKE2b-256 5dbdf67ccc4d382e29f7ea5f1e82729b5058444e1f0f7ee2aa9e777d92506a50

See more details on using hashes here.

Provenance

The following attestation bundles were made for habit_tracker_cli-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on Luis696969/habit-tracker-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page