A command-line interface (CLI) application for managing tasks developed in C#.
- Add tasks: Create new tasks by providing a name and description.
- List tasks: Display all saved tasks in a tabular format.
- Get task: Retrieve and display the details of a specific task by its ID.
- Mark task as done: Update a task’s status to "done".
- Delete tasks: Remove specific tasks using their ID.
- .NET SDK 8.0
- Optional: Text editor or IDE such as Visual Studio, Visual Studio Code, or JetBrains Rider.
- Optionally, you can change the path of the JSON file where tasks are saved:
var services = new ServiceCollection() .AddTransient<ITaskRepository>(provider => new JsonFileTaskRepository("custom_path.json")) .BuildServiceProvider(); ITaskRepository taskRepository = services.GetService<ITaskRepository>()!;
- Build the project:
dotnet build
- Run the application:
dotnet run -- <command> [options]
dotnet run -- add -n "Task Name" -d "Task Description"
dotnet run -- list
dotnet run -- get -i <task_id>
dotnet run -- mark-done -i <task_id>
dotnet run -- delete -i <task_id>
- CommandLineParser: For handling command-line arguments and options.
- ConsoleTables: For creating tables to list tasks.