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:
addlisttodaydonestreakreporthelpmanclearclear-dataexitq
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c221b62037ad0fe44e2bb169530c6e82c304e0613d2d7f4e75cb50c9f715db0e
|
|
| MD5 |
db9d0df25f62e53d64836987cf5ea58d
|
|
| BLAKE2b-256 |
769f0d1ecb3fce47ad8d58e9f34baf5851e679ccb7703b7782fec418b9908771
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
habit_tracker_cli-0.1.0.tar.gz -
Subject digest:
c221b62037ad0fe44e2bb169530c6e82c304e0613d2d7f4e75cb50c9f715db0e - Sigstore transparency entry: 1282955570
- Sigstore integration time:
-
Permalink:
Luis696969/habit-tracker-cli@012a2f9c2f6ff4e9c15ffa7dc435f09f3d263d8d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Luis696969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@012a2f9c2f6ff4e9c15ffa7dc435f09f3d263d8d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file habit_tracker_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: habit_tracker_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80edb393879572b3eebf0a18f1b460636374fe9b882a314a522b78b098057803
|
|
| MD5 |
c1db93d60c4a9c0a7c650b0a6d776a29
|
|
| BLAKE2b-256 |
5dbdf67ccc4d382e29f7ea5f1e82729b5058444e1f0f7ee2aa9e777d92506a50
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
habit_tracker_cli-0.1.0-py3-none-any.whl -
Subject digest:
80edb393879572b3eebf0a18f1b460636374fe9b882a314a522b78b098057803 - Sigstore transparency entry: 1282955578
- Sigstore integration time:
-
Permalink:
Luis696969/habit-tracker-cli@012a2f9c2f6ff4e9c15ffa7dc435f09f3d263d8d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Luis696969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@012a2f9c2f6ff4e9c15ffa7dc435f09f3d263d8d -
Trigger Event:
workflow_dispatch
-
Statement type: