The To-Do List Command-Line Application is a simple and efficient tool for managing tasks directly from the command line. Users can add tasks, mark them as complete, and view the status of all tasks. The tasks are stored in a JSON file to persist across sessions.
- Add Tasks: Easily add tasks that are saved and available across sessions.
- Complete Tasks: Mark tasks as complete once they are done.
- View All Tasks: Display all tasks along with their status (
pending
ordone
). - Persistent Storage: Tasks are saved in a
JSON
file to ensure they are not lost between uses.
- Python: Core programming language.
- JSON: Used to store tasks across sessions.
-
Clone the Repository:
git clone https://github.com/your-username/to-do-list-cli.git cd to-do-list-cli
-
Run the Application:
python todo.py
-
Available Commands:
-
Add a Task:
Typeadd
to add a new task to your to-do list.
Example:Enter command (add, complete, show, exit): add Enter task: Finish the Python project
-
Complete a Task:
Typecomplete
to mark a task as complete.
Example:Enter command (add, complete, show, exit): complete Enter task number to complete: 0 Task completed!
-
Show All Tasks:
Typeshow
to display all tasks and their status (pending
/done
).
Example:Enter command (add, complete, show, exit): show 0: Finish the Python project [pending]
-
Exit the Program:
Typeexit
to close the program.
-
# Adding a task
Enter command (add, complete, show, exit): add
Enter task: Finish Python project
# Showing all tasks
Enter command (add, complete, show, exit): show
0: Finish Python project [pending]
# Completing a task
Enter command (add, complete, show, exit): complete
Enter task number to complete: 0
Task completed!
# Showing tasks again
Enter command (add, complete, show, exit): show
0: Finish Python project [done]
# Exit the program
Enter command (add, complete, show, exit): exit