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
  • Undo today's completion for a habit
  • Delete a habit and its completion history
  • 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.

pipx install habit-tracker-cli

Alternative with pip:

pip install habit-tracker-cli

Linux

Recommended: pipx.

pipx install habit-tracker-cli

Alternative with pip:

pip install habit-tracker-cli

Install from source

pipx install .

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 undo "Read 20 min"
habit-tracker delete "Go to the gym"
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
  • undo
  • delete
  • 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 with pip:

pip uninstall habit-tracker-cli

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

Releases

Releases are published to PyPI through GitHub Actions using PyPI trusted publishing.

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.2.tar.gz (20.8 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.2-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: habit_tracker_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 20.8 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.2.tar.gz
Algorithm Hash digest
SHA256 f02ba4e57943818e2d6c580098ab0653a116f4f26449554495305ed55b1afe39
MD5 c075adc42b628db3b585241e58cddb36
BLAKE2b-256 137de5e7c6f1b159088b867701e0c5f274743b83e8d89eab734cbd08d9165b23

See more details on using hashes here.

Provenance

The following attestation bundles were made for habit_tracker_cli-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for habit_tracker_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7be6fd81ffd22d0332b109d59dc5fcf09334b94ca7c6e67c79cf7b5df60cf832
MD5 640bfa12b10f6706cd078eb0892d1d05
BLAKE2b-256 61a7655cb38a3571559b3ce337e4f1e518b41c3ef342d65800d40632d3574d15

See more details on using hashes here.

Provenance

The following attestation bundles were made for habit_tracker_cli-0.1.2-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