Skip to content

rafidoth/todo-cli-td-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Todo CLI

A simple command-line todo list application written in Go that helps you manage your daily tasks.

Features

  • Add multiple tasks
  • Mark tasks as completed
  • Delete tasks
  • List all tasks (including completed ones)
  • List pending tasks
  • Persistent storage using JSON
  • Simple and intuitive CLI interface

Building from Source

Prerequisites

  • Go 1.16 or higher
  • Git

Installation Steps

  1. Clone the repository
git clone https://github.com/yourusername/todo-cli
cd todo-cli
  1. Build the application
go build -o todo ./cmd/todo
  1. (Optional) Add to PATH
# On Unix-like systems (Linux/macOS)
sudo mv todo /usr/local/bin/

# On Windows
# Move the todo.exe to a location in your PATH

Usage

Adding Tasks

To add new tasks:

todo -a

Then enter your tasks one per line. Press Enter twice to finish.

Listing Tasks

List pending tasks:

todo
# or
todo -l

List all tasks (including completed):

todo -s

Completing Tasks

Mark a task as completed:

todo -c <task-number>

Deleting Tasks

Delete a task:

todo -d <task-number>

Command Line Options

-a    Add a new task
-c    Complete a task (requires task number)
-d    Delete a task (requires task number)
-l    List all pending tasks
-s    Show all tasks (including completed)

Data Storage

The application stores your todo list in a .todo.json file in the current directory.

Example Usage

# Add new tasks
$ todo -a
Enter task name (press Enter twice to finish):
Buy groceries
Call mom
Finish project report
[Enter]

# List pending tasks
$ todo
🚀 Buy groceries
🚀 Call mom
🚀 Finish project report

# Mark task 2 as completed
$ todo -c 2

# Show all tasks
$ todo -s
🚀 Buy groceries
📦 Call mom
    Completed at (15 January, 2024, 03:04:05 PM)
🚀 Finish project report

About

Simple Usable Todo app for day to day usage (specially for devs) built in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages