A simple Command Line Interface (CLI) application built with Java to manage a to-do list. This project adheres to the constraint of using only native Java features and stores all task data in a local tasks.json file, without relying on any external libraries or frameworks.
- Java Development Kit (JDK) 8 or higher installed on your system.
-
Clone the Repository:
git clone cd -
Compile the Java Files: Open your terminal in the project directory and compile both source files.
javac Task.java TaskCLI.java
-
Run Commands: Execute the application using the
java TaskCLIcommand followed by the action and arguments.
All commands use positional arguments. Descriptions containing spaces must be enclosed in double quotes.
| Command | Usage Example | Output Example |
|---|---|---|
| Add | java TaskCLI add "Buy groceries" |
Task added successfully (ID: 1) |
| Update | java TaskCLI update 1 "Buy groceries and cook dinner" |
Task 1 updated successfully. |
| Delete | java TaskCLI delete 1 |
Task 1 deleted successfully. |
| Mark In-Progress | java TaskCLI mark-in-progress 2 |
Task 2 marked as in progress. |
| Mark Done | java TaskCLI mark-done 2 |
Task 2 marked as done. |
| List All | java TaskCLI list |
[1] [TODO] Buy groceries... |
| List Done | java TaskCLI list done |
[2] [DONE] Finish project... |
| List Todo | java TaskCLI list todo |
No tasks found. |
Tasks are stored in the local tasks.json file. Each task object includes:
id: Unique identifier (auto-incrementing)description: The task descriptionstatus: One of (todo,in-progress,done)createdAt: Timestamp of creationupdatedAt: Timestamp of last modification