A simple command-line interface (CLI) application built in Go to track and manage tasks. This project is a solution to the Task Tracker challenge from roadmap.sh.
Project URL: https://roadmap.sh/projects/task-tracker
- Add Tasks: Create new tasks with a description.
- List Tasks: View all tasks or filter by status (
todo,in-progress,done). - Update Tasks: Modify the description of existing tasks.
- Mark Status: Change task status to
in-progressordone. - Delete Tasks: Remove tasks permanently.
- Persistence: Automatically stores data in a
tasks.jsonfile. - No External Dependencies: Built using only the Go standard library (
os,encoding/json,time,strconv,fmt).
- Go installed on your machine (version 1.18 or higher recommended).
- Clone the repository:
git clone https://github.com/yourusername/task-tracker-cli.git
cd task-tracker-cli
- Build the application:
go build -o task-cli
On Windows, this will create task-cli.exe. On Linux/macOS, it creates task-cli.
./task-cli add "Buy groceries"
# Output: Task added successfully!
List all tasks:
./task-cli list
List tasks by status:
./task-cli list done
./task-cli list todo
./task-cli list in-progress
Update a task's description by providing its ID.
./task-cli update 1 "Buy groceries and cook dinner"
Mark a task as "In Progress" or "Done":
./task-cli mark-in-progress 1
./task-cli mark-done 1
Remove a task by its ID.
./task-cli delete 1
The application creates a tasks.json file in the current directory to persist data.
- Format: JSON
- Fields:
id,description,status,createdAt,updatedAt
task-tracker-cli/
├── main.go # Source code
├── tasks.json # Data store (auto-generated)
└── README.md # Project documentation