Skip to content

Dedo-Finger2/TaskCli-RoadmapSh

Repository files navigation

✅ TaskCLI - Tracking tasks in your terminal


TaskCLI is a lightweight command-line task tracker built in C# without any third-party libraries. It helps you manage your tasks efficiently by allowing you to add, update, delete, and track their progress. All tasks are stored in a JSON file in the current directory for easy persistence.

This project is a backend programming challenge from roadmap.sh website. Here's the link to it: https://roadmap.sh/projects/task-tracker


🚀 Features

  • Add tasks with descriptions;
  • Update and delete tasks;
  • Mark tasks as todo, in-progress, or done;
  • List all tasks or filter by status;
  • JSON-based storage (automatically created if it doesn't exist);
  • Simple and fast command-line interface.

📥 Installation

1️⃣ Clone this repository

git clone https://github.com/yourusername/taskcli.git

2️⃣ Build the project

dotnet build -c Release

3️⃣ Run the binary

On Linux/macOS:

./bin/Release/net9.0/taskcli

On Windows:

bin\Release\net9.0\taskcli.exe

4️⃣ (Optional) Install globally

On Linux/macOS:

sudo mv bin/Release/net9.0/taskcli /usr/local/bin/taskcli

On Windows:

Add the bin/Release/net9.0/ directory to your system PATH.

📌 Usage

Add a New Task

taskcli add "Buy groceries"

Update a Task

taskcli update 1 "Buy groceries and cook dinner"

Delete a Task

taskcli delete 1

Mark a Task as In Progress

taskcli mark-in-progress 1

Mark a Task as Done

taskcli mark-done 1

List All Tasks

taskcli list

List Tasks by Status

taskcli list done
taskcli list todo
taskcli list in-progress

📂 Task Structure (Stored in database.json)

Each task is stored with the following properties:

{
  "tasks": [
    {
      "id": 1,
      "description": "Buy groceries",
      "status": "Todo",
      "createdAt": "2025-03-28T14:00:00Z",
      "updatedAt": "2025-03-28T14:00:00Z"
    }
  ]
}

⚠️ Error Handling

If a task ID does not exist, an appropriate error message is shown. There is also a log file named taskcli-error-log.log that is created in the root folder (same as the cli binary).

📜 License

This project is licensed under the MIT License.

Enjoy using TaskCLI to manage your tasks efficiently! 💻🎯

About

A simple task CLI program from Roadmap.sh

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages