A command-line task tracker, built as the roadmap.sh Task Tracker project.
Pure Java (JDK only, no external libraries), tasks persisted to a tasks.json file in the
working directory.
- Add, update, and delete tasks
- Mark a task as in-progress or done
- List all tasks, or filter by status (todo / in-progress / done)
- Each task has:
id,description,status,createdAt,updatedAt - Store tasks in a JSON file; create it if missing
- No external libraries or frameworks
- Handle errors and edge cases gracefully
add "description"
update <id> "new description"
delete <id>
mark-in-progress <id>
mark-done <id>
list
list <todo|in-progress|done>
src/tasktracker/
Main.java entry point: parses args, dispatches commands
Task.java the task model
TaskStatus.java enum: TODO / IN_PROGRESS / DONE
Json.java minimal hand-rolled JSON read/write (plumbing)
TaskRepository.java load()/save() the list to tasks.json (plumbing)
Done (scaffold): structure, Task, TaskStatus, JSON persistence, and two worked
commands to copy the pattern from: add and list.
Your turn (the practice): implement update, delete, and mark
(mark-in-progress / mark-done) in Main.java. Each one loads the list, changes it, and
saves it, exactly like add. There is a parseId(...) helper ready for you, and each TODO
method has step-by-step hints in a comment.
Needs only a JDK (built and tested with Temurin 21).
Git Bash:
javac -d out src/tasktracker/*.java
java -cp out tasktracker.Main add "Buy groceries"
java -cp out tasktracker.Main listPowerShell:
javac -d out (Get-ChildItem -Recurse src -Filter *.java).FullName
java -cp out tasktracker.Main add "Buy groceries"IntelliJ: open the folder, mark src as Sources Root, run Main (pass arguments via
Run/Debug Configurations).
$ java -cp out tasktracker.Main add "Buy groceries"
Task added successfully (ID: 1)
$ java -cp out tasktracker.Main mark-in-progress 1
$ java -cp out tasktracker.Main list in-progress
#1 [in-progress] Buy groceries
tasks.jsonis created on firstaddand is git-ignored (runtime data).- When you are ready to show this off,
git inithere and push it as its own repo. - Progress is tracked in the notes vault:
Notes/Projects/Task-Tracker-CLI.md.