Skip to content

kzankpe/task-tracker-cli-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Tracker Console Application

Project Task URL : https://roadmap.sh/projects/task-tracker

Golang CLI solution for the task-tracker challenge from roadmap.sh.

This CLI allows you to add, update, delete, and list tasks with various statuses such as "To-Do," "In-Progress," and "Done."

Features

  • Add a New Task: Create new tasks with a simple command.
  • Update Task: Modify the description of an existing task.
  • Delete Task: Remove tasks by their ID.
  • List Tasks: Display all tasks or filter tasks by status.
  • Change Task Status: Mark tasks as "To-Do," "In-Progress," or "Done."
  • Help Command: Display a list of available commands.
  • Clear Console: Clear the console and display the welcome message again.

Installation

To run this application, follow these steps:

git clone https://github.com/kzankpe/task-tracker-cli-go.git

Run the following command to build and run the project:

go build -o task-cli
./task-cli --help # To see the list of available commands

Usage

task-cli [command]

Available Commands

  • add [description]: Adds a new task with the provided description.
  • update [id] [new description]: Updates the task with the given ID.
  • delete [id]: Deletes the task with the given ID.
  • list: Lists all tasks.
  • list [status]: Lists tasks filtered by status ("todo", "in-progress", "done").
  • markInProgress [id]: Marks the task with the given ID as "In-Progress".
  • markDone [id]: Marks the task with the given ID as "Done".
  • help: Display help about the cli.

Example

# Adding a new task
task-cli add "Buy groceries"
# Output: Task added successfully (ID: 1)

# Updating and deleting tasks
task-cli update 1 "Buy groceries and cook dinner"
task-cli delete 1

# Marking a task as in progress or done
task-cli mark-in-progress 1
task-cli mark-done 1

# Listing all tasks
task-cli list

# Listing tasks by status
task-cli list done
task-cli list todo
task-cli list in-progress

About

Task tracker is a project used to track and manage your tasks. In this task, you will build a simple command line interface (CLI) to track what you need to do, what you have done, and what you are currently working on.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages