nirmit27 / todo-cli

This is a lightweight CLI ToDo application created using Go.

Home Page:https://roadmap.sh/projects/task-tracker/solutions?u=64d6ca80aa497d7fa528b16a

Repository from Github https://github.comnirmit27/todo-cliRepository from Github https://github.comnirmit27/todo-cli

Todo CLI πŸ“

Gophers

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.

Features

  • 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. πŸ“

Installation

1. Clone the Repository

git clone https://github.com/nirmit27/todo-cli.git
cd todo-cli

2. Build the Executable

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.

Usage

The task-cli application supports the following commands:

1. Add a Task

Add a new task with a description.

./todo-cli add "<description>"

Output:

Task added successfully! ID : n

2. Update a Task

Update the description of an existing task by its ID.

./todo-cli update <id> "<new description>"

Output:

Task [n] updated successfully!

3. Delete a Task

Delete a task by its ID.

./todo-cli delete <id>

Output:

Task [n] deleted successfully!

4. Mark a Task as todo, in-progress or done

Update the status of a task by its ID.

./todo-cli mark <id> <new-status>

5. View Task details

Get the detailed view of a task by its ID.

./todo-cli details <id>

Output:

 --- Task [<id>] ---

 Description : <description>
 Status : <status>
 Created at : <time-of-creation>
 Updated at : <time-of-updation>

6. List All Tasks

List all the tasks stored in the JSON file.

./todo-cli list

7. List Tasks by Status

List tasks filtered by their status (todo, in-progress, or done).

./todo-cli list <status>

Dependencies

This application is built using only Go's standard library. No external libraries are required.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

This is a lightweight CLI ToDo application created using Go.

https://roadmap.sh/projects/task-tracker/solutions?u=64d6ca80aa497d7fa528b16a

License:MIT License


Languages

Language:Go 100.0%