A simple command-line todo list application written in Go that helps you manage your daily tasks.
- 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
- Go 1.16 or higher
- Git
- Clone the repository
git clone https://github.com/yourusername/todo-cli
cd todo-cli
- Build the application
go build -o todo ./cmd/todo
- (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
To add new tasks:
todo -a
Then enter your tasks one per line. Press Enter twice to finish.
List pending tasks:
todo
# or
todo -l
List all tasks (including completed):
todo -s
Mark a task as completed:
todo -c <task-number>
Delete a task:
todo -d <task-number>
-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)
The application stores your todo list in a .todo.json
file in the current directory.
# 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