Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Todo CLI

A simple command-line interface (CLI) application for managing your to-do tasks, built with Go.

Features

  • Add new tasks
  • List all tasks (with --all flag for completed tasks)
  • Mark tasks as completed
  • Delete tasks

Project Structure

todo-cli/
├── cmd/
│   └── tasks/
│       └── main.go
└── internal/
    └── task/
        ├── task.go
        └── storage.go

Installation

  1. Clone the repository:
    git clone https://github.com/OxRokib/bgce-archive.git
    
  2. Navigate to the project directory:
    cd bgce-archive/mini-projects/todo-cli
    
  3. Build the application:
    go build -o todo cmd/tasks/main.go
    

Usage

Add a Task

./todo add "Your task description"

List Tasks

List incomplete tasks:

./todo list

List all tasks (including completed):

./todo list --all

Mark a Task as Completed

./todo complete <task-id>

Delete a Task

./todo delete <task-id>

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.