Skip to content

alighazal/cli-todo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLI Todo App

An interactive command-line todo manager backed by SQLite, with support for tasks, subtasks, descriptions, and ASCII tree views.

Requirements

  • Python 3.9+

Setup

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Run

python3 main.py

Commands

Command Description
add <name> Add a task. Prints its assigned ID.
add-subtask <id> <desc> Add a subtask to a task.
edit <id> Interactively edit a task's name and description.
complete <id> Mark a task as done (e.g. complete 2).
complete <id>.<n> Mark the nth subtask as done (e.g. complete 1.2).
view List all tasks.
view-everything Show tasks and subtasks as a tree.
view-completed Show completed items.
help Show all commands.
quit Exit.

Tab-completion and command history are supported out of the box.

Sample Session

todo> add Buy groceries
Task added with ID 1.
todo> add Fix bug #42
Task added with ID 2.
todo> add-subtask 1 milk
Subtask 1 added to task 1.
todo> add-subtask 1 eggs
Subtask 2 added to task 1.
todo> add-subtask 2 reproduce on staging
Subtask 3 added to task 2.
todo> complete 1.1
Subtask 1.1 marked as complete.
todo> complete 2
Task 2 marked as complete.
todo> view-everything
Tasks
├───── [ ]  [1.] Buy groceries
│  ├───[x]──[1.1]   milk
│  └───[ ]──[1.2]   eggs
└───── [x]  [2.] Fix bug #42
   └───[ ]──[2.1]   reproduce on staging
todo> view-completed
Completed
├───── [!]  [1.] Buy groceries
│  └───[x]──[1.1]   milk
└───── [x]  [2.] Fix bug #42

[ ] — pending · [x] — done · [!] — task has completed subtasks but is not done itself

Run Tests

pytest tests/ -v

About

a cli-based tasks tracker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages