This is a lightweight, terminal-based task management application built with Go. It allows you to add, update, delete, and list tasks using simple commands. The tasks are written into and read from a JSON file for persistence.
This is a sample solution for the task-tracker project from roadmap.sh projects.
- Add tasks with descriptions. 📝
- Update tasks by their ID. ✍️
- Delete tasks by their ID. 🗑️
- Mark tasks as in-progress or done. ☑️
- List tasks, optionally filtered by status (todo, in-progress, done). 📃
- Tasks are stored in a
tasks.json
file in the current directory. 📁
git clone https://github.com/nirmit27/todo-cli.git
cd todo-cli
Run the following command to build the executable:
go build -o todo-cli
This will create an executable file named todo-cli
in the current directory.
The task-cli application supports the following commands:
Add a new task with a description.
./todo-cli add "<description>"
Task added successfully! ID : n
Update the description of an existing task by its ID.
./todo-cli update <id> "<new description>"
Task [n] updated successfully!
Delete a task by its ID.
./todo-cli delete <id>
Task [n] deleted successfully!
Update the status of a task by its ID.
./todo-cli mark <id> <new-status>
Get the detailed view of a task by its ID.
./todo-cli details <id>
--- Task [<id>] ---
Description : <description>
Status : <status>
Created at : <time-of-creation>
Updated at : <time-of-updation>
List all the tasks stored in the JSON file.
./todo-cli list
List tasks filtered by their status (todo
, in-progress
, or done
).
./todo-cli list <status>
This application is built using only Go's standard library. No external libraries are required.
This project is licensed under the MIT License. See the LICENSE file for more details.