A simple Command Line Interface (CLI) tool to manage and track tasks. This project allows you to add, update, delete tasks, and mark tasks as in-progress or done. Tasks are stored in a JSON file and can be listed based on their status.
- Add new tasks
- Update existing tasks
- Delete tasks
- Mark tasks as "in-progress" or "done"
- List tasks based on their status
- All tasks are stored in a
tasks.jsonfile
- Node.js installed on your machine
- Clone the repository:
git clone https://github.com/yourusername/task-tracker-cli.git- Navigate to the project directory:
cd task-tracker-cli-
Install dependencies (if any) — currently, there are no external dependencies, so this step is not necessary unless you add some in the future.
-
Run the CLI commands:
node task-cli.js <command> <arguments>To add a new task, use the add command followed by the task description.
node task-cli.js add "Buy groceries"To update a task description, use the update command followed by the task ID and the new description.
node task-cli.js update 1 "Finish project and submit"To delete a task, use the delete command followed by the task ID.
node task-cli.js delete 1To mark a task as in-progress, use the mark-in-progress command followed by the task ID.
node task-cli.js mark-in-progress 1To mark a task as done, use the mark-done command followed by the task ID.
node task-cli.js mark-done 1To list all tasks, use the list command.
node task-cli.js listTo list tasks by their status (todo, in-progress, or done), pass the status as an argument.
node task-cli.js list todoAll tasks are stored in a JSON file named tasks.json in the project directory. The file is automatically created if it doesn't exist. Each task has the following properties:
- id: A unique identifier for the task
- description: The task description
- status: The current status of the task (todo, in-progress, or done)
- createdAt: The date and time when the task was created
- updatedAt: The date and time when the task was last updated