8000 GitHub - goholic/task-cli: Repo for roadmap.sh - task-list project.
[go: up one dir, main page]

Skip to content

goholic/task-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Task Tracker CLI

A simple command-line interface (CLI) application built in Go to track and manage tasks. This project is a solution to the Task Tracker challenge from roadmap.sh.

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

Features

  • Add Tasks: Create new tasks with a description.
  • List Tasks: View all tasks or filter by status (todo, in-progress, done).
  • Update Tasks: Modify the description of existing tasks.
  • Mark Status: Change task status to in-progress or done.
  • Delete Tasks: Remove tasks permanently.
  • Persistence: Automatically stores data in a tasks.json file.
  • No External Dependencies: Built using only the Go standard library (os, encoding/json, time, strconv, fmt).

Prerequisites

  • Go installed on your machine (version 1.18 or higher recommended).

Installation &am 76F3 p; Setup

  1. Clone the repository:
git clone https://github.com/yourusername/task-tracker-cli.git
cd task-tracker-cli
  1. Build the application:
go build -o task-cli

On Windows, this will create task-cli.exe. On Linux/macOS, it creates task-cli.

Usage

1. Add a New Task

./task-cli add "Buy groceries"
# Output: Task added successfully!

2. List Tasks

List all tasks:

./task-cli list

List tasks by status:

./task-cli list done
./task-cli list todo
./task-cli list in-progress

3. Update a Task

Update a task's description by providing its ID.

./task-cli update 1 "Buy groceries and cook dinner"

4. Mark Task Status

Mark a task as "In Progress" or "Done":

./task-cli mark-in-progress 1
./task-cli mark-done 1

5. Delete a Task

Remove a task by its ID.

./task-cli delete 1

Data Storage

The application creates a tasks.json file in the current directory to persist data.

  • Format: JSON
  • Fields: id, description, status, createdAt, updatedAt

Project Structure

task-tracker-cli/
├── main.go         # Source code
├── tasks.json      # Data store (auto-generated)
└── README.md       # Project documentation

About

Repo for roadmap.sh - task-list project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0