A command-line application for tracking and managing tasks, developed in C++ as part of the Task Tracker Project by Roadmap.sh.
Version with database: Task Tracker CLI - MySQL Version
- Add, Update, and Delete tasks
- Mark a task as in progress or done
- List all tasks
- List all tasks are not done
- List all tasks are in progress
- List all tasks are done
- Language: C++
- CLI Structure: Input/output handling
- Data Persistence: Store the tasks in a JSON file
- For compile:
- Windows: MSVC (Visual Studio Developer Command Prompt)
- Linux: GCC (GNU Compiler Collection)
- For execute:
- Read/write permission
- Clone the repository:
git clone https://github.com/jmsmarcelo/task-tracker-cli-cpp.git cd task-tracker-cli-cpp
- Compile the project:
mkdir bin cd bin # Linux: g++ -o task-cli ../src/*.cpp # Windows (Visual Studio Developer Command Prompt): cl /EHsc /Fe:task-cli.exe ..\src\*.cpp
- Run the application:
# Linux: ./task-cli help # Windows: .\task-cli help
# Adding a new task
task-cli add "Buy groceries"
# output: Task added successfully (ID: 1)
# Updating task
task-cli update 1 "Buy groceries and cook dinner"
# output: Task updated successfully
# Deleting task
task-cli delete 1
# output: Task deleted successfully
# Marking a task as in progress
task-cli mark-in-progress 1
# output: Task marked as in-progress successfully
# Marking a task as done
task-cli mark-done 1
# output: Task marked as done successfully
# Listing all tasks
task-cli list
# output: ┌────────┬────────────────────────────────────────────────────┬─────────────┬─────────────────────┬─────────────────────┐
# │ ID │ Description │ Status │ Created At │ Updated At │
# ├────────┼────────────────────────────────────────────────────┼─────────────┼─────────────────────┼─────────────────────┤
# │ 1 │ Buy groceries and cook dinner │ todo │ 2024-12-31 09:14:19 │ 2024-12-31 09:24:32 │
# └────────┴────────────────────────────────────────────────────┴─────────────┴─────────────────────┴─────────────────────┘
# Listing tasks by status
task-cli list todo
task-cli list in-progress
task-cli list done
task-tracker-cli-cpp/
└─ src/
├─ main.cpp # Application entry point
├─ task_cli.hpp # User input handling declaration header
├─ task_cli.cpp # User input handling definition file
├─ TaskModel.hpp # Domain model declaration header
├─ TaskModel.cpp # Domain model definition file
├─ TaskStatus.hpp # Status enum declaration header
├─ TaskStatus.cpp # Status enum definition file
├─ TaskService.hpp # Service logic declaration header
├─ TaskService.cpp # Sask service logic definition file
├─ TaskRepository.hpp # File persistence handling declaration header
└─ TaskRepository.cpp # File persistence handling definition file
Contributions are welcome!
To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m "add new feature"
- Push to the branch:
git push origin my-new-feature
- Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.
Created by Jose Marcelo. Feel free to get in touch or explore more of my projects!