Context
list shows all tasks, but there's no quick way to answer "how much do I still have to do?" without eyeballing the checkbox characters. count gives you the answer in one number, which is useful for scripting and for a fast sanity check before starting a work session.
Behavior
$ python3 cli.py count
3 pending
Reads from tasks.json. Doesn't write. Exits 0 on success.
Acceptance criteria
Not in scope
- Category filters, tags, or due-date filtering. Just the count.
- Coloring the output. Plain text only.
Files that may change
tasks.py — add count_pending(self) -> int, reusing the existing pending() helper.
cli.py — add elif command == "count": branch and update the usage string.
tests/test_tasks.py — new test cases for the three scenarios above.
Context
listshows all tasks, but there's no quick way to answer "how much do I still have to do?" without eyeballing the checkbox characters.countgives you the answer in one number, which is useful for scripting and for a fast sanity check before starting a work session.Behavior
Reads from
tasks.json. Doesn't write. Exits0on success.Acceptance criteria
python3 cli.py countprints<N> pendingwhereNexcludes tasks marked done.0 pending, exits0.countalongsideadd | list | done.tests/test_tasks.pycover: none pending, some pending, all done.Not in scope
Files that may change
tasks.py— addcount_pending(self) -> int, reusing the existingpending()helper.cli.py— addelif command == "count":branch and update the usage string.tests/test_tasks.py— new test cases for the three scenarios above.