Task Tracker is a simple, zero-dependency command-line application to help you manage your daily tasks efficiently. Built in Go, it stores your tasks locally in a JSON file and allows you to add, update, delete, and track statuses like todo, in-progress, and done — all from your terminal.
- ✅ Add new tasks with descriptions
- ✏️ Update task descriptions
- ❌ Delete tasks
- 🔄 Mark tasks as
in-progress
ordone
- 📋 List all tasks or filter by status:
todo
,in-progress
,done
- 📁 Stores tasks persistently in a local
tasks.json
file - 🧱 No external libraries or frameworks used — just the Go standard library
- Make sure you have Go installed: Install Go
- Clone the repository:
git clone https://github.com/yash27007/task-tracker.git
cd task-tracker-cli
- Build the CLI:
go build -o task-cli
This creates a binary named task-cli
.
The CLI uses positional arguments to perform different operations.
./task-cli add "Buy groceries"
# Output: Task added successfully (ID: 1)
./task-cli update 1 "Buy groceries and cook dinner"
# Output: Task updated successfully
./task-cli delete 1
# Output: Task deleted successfully
./task-cli mark-in-progress 1
# Output: Task marked as in-progress
./task-cli mark-done 1
# Output: Task marked as done
./task-cli list
./task-cli list todo
./task-cli list in-progress
./task-cli list done
Each task is stored in tasks.json
and has the following structure:
{
"id": 1,
"description": "Buy groceries",
"status": "todo",
"createdAt": "2025-05-15T14:34:00Z",
"updatedAt": "2025-05-15T14:34:00Z"
}
- All tasks are stored in a JSON file named
tasks.json
in the current working directory. - The file is automatically created if it does not exist.
- Gracefully handles invalid commands, missing files, incorrect IDs, and malformed inputs.
- Provides user-friendly error messages and status updates.
./task-cli add "Write documentation"
./task-cli add "Fix bug #102"
./task-cli list
./task-cli mark-in-progress 2
./task-cli mark-done 1
./task-cli list done
./task-cli delete 1
This project is ideal for Go beginners and helps you practice:
- Working with the filesystem
- Reading/writing JSON
- Creating command-line tools
- Handling CLI arguments
- Error handling and validation
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License. See the LICENSE file for details.