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.
- PyPI: https://pypi.org/project/habit-tracker-cli/
- Repository: https://github.com/Luis696969/habit-tracker-cli
- Requires Python 3.12+
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:
addlisttodaydoneundodeletestreakreporthelpmanclearclear-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 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
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.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f02ba4e57943818e2d6c580098ab0653a116f4f26449554495305ed55b1afe39
|
|
| MD5 |
c075adc42b628db3b585241e58cddb36
|
|
| BLAKE2b-256 |
137de5e7c6f1b159088b867701e0c5f274743b83e8d89eab734cbd08d9165b23
|
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
-
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.2.tar.gz -
Subject digest:
f02ba4e57943818e2d6c580098ab0653a116f4f26449554495305ed55b1afe39 - Sigstore transparency entry: 1283936061
- Sigstore integration time:
-
Permalink:
Luis696969/habit-tracker-cli@1a8bc50a3702bcf8507e9a069331cbcec82975c6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Luis696969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1a8bc50a3702bcf8507e9a069331cbcec82975c6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file habit_tracker_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: habit_tracker_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 18.9 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 |
7be6fd81ffd22d0332b109d59dc5fcf09334b94ca7c6e67c79cf7b5df60cf832
|
|
| MD5 |
640bfa12b10f6706cd078eb0892d1d05
|
|
| BLAKE2b-256 |
61a7655cb38a3571559b3ce337e4f1e518b41c3ef342d65800d40632d3574d15
|
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
-
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.2-py3-none-any.whl -
Subject digest:
7be6fd81ffd22d0332b109d59dc5fcf09334b94ca7c6e67c79cf7b5df60cf832 - Sigstore transparency entry: 1283936562
- Sigstore integration time:
-
Permalink:
Luis696969/habit-tracker-cli@1a8bc50a3702bcf8507e9a069331cbcec82975c6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Luis696969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@1a8bc50a3702bcf8507e9a069331cbcec82975c6 -
Trigger Event:
release
-
Statement type: