A simple command-line tool, written in Go, for tracking tasks and managing your to-do list. Built as a solution to the Task Tracker backend project on roadmap.sh.
Tasks are stored locally in a tasks.json file — no database, no server, no external dependencies. Just the Go standard library.
- Add, update, and delete tasks
- Mark a task as
todo,in-progress, ordone - List all tasks, or filter by status
- Data persists between runs in a plain JSON file
- Zero external dependencies — pure Go standard library
- Go 1.22 or later installed
- Verify with:
go version
Since this project is a proper Go module, you can install the task-cli binary straight from GitHub with a single command — no need to clone the repo first:
go install github.com/<your-username>/task-tracker-cli@latestThis downloads, builds, and places the task-cli binary in your $GOPATH/bin (usually ~/go/bin). Make sure that folder is on your PATH:
export PATH="$PATH:$(go env GOPATH)/bin"Add that line to your ~/.zshrc or ~/.bashrc to make it permanent. Once installed, you can run task-cli from anywhere:
task-cli add "Buy groceries"
task-cli listgit clone https://github.com/<your-username>/task-tracker-cli.git
cd task-tracker-cliThen build it:
go build -o task-cliThis produces an executable called task-cli (task-cli.exe on Windows) in the project folder.
Run it:
./task-cli add "Buy groceries"On Windows use task-cli.exe instead of ./task-cli, or run directly without building:
go run . add "Buy groceries"# Add a new task
./task-cli add "Buy groceries"
# Task added successfully (ID: 1)
# Update a task's description
./task-cli update 1 "Buy groceries and cook dinner"
# Delete a task
./task-cli delete 1
# Mark a task's status
./task-cli mark-in-progress 1
./task-cli mark-done 1
# List tasks
./task-cli list # all tasks
./task-cli list done # only done
./task-cli list todo # only todo
./task-cli list in-progress # only in-progressEach task is stored with an id, description, status, createdAt, and updatedAt timestamp inside tasks.json in the current directory.
- Build succeeds without errors:
go build -o task-cli
- Basic flow works end to end:
You should see
./task-cli add "Test task" ./task-cli listTask added successfully (ID: 1)followed by the task listed astodo. - Data actually persists — open
tasks.jsonin the project folder and confirm the task appears there with the correct fields. - Status updates work:
The task should now appear in the
./task-cli mark-done 1 ./task-cli list donedonefilter. - Error handling works (should print a clear error, not crash):
./task-cli update 99 "no such task" ./task-cli delete 99 ./task-cli mark-done abc ./task-cli - (If included) Automated tests pass:
go test ./... -v
If all of the above behave as described, the project is working correctly.
task-tracker-cli/
├── go.mod
├── main.go # CLI argument parsing and command routing
├── task.go # Task struct + business logic (add/update/delete/mark/list)
├── storage.go # Reading/writing tasks.json
├── assets/
│ └── demo-terminal.png
└── tasks.json # created automatically at runtime (not committed)
Feel free to use this project for learning purposes.