Todo-CLI-Go is a command-line interface (CLI) tool written in Go for managing a simple to-do list. It allows users to add, list, edit, and toggle tasks directly from the command line.
Follow these steps to get your Todo-CLI-Go project up and running:
-
Clone the Repository
git clone https://github.com/hackice20/todo-cli-go.git
-
Go Setup
Navigate to the project directory:
cd todo-cli-go
Ensure you have Go installed. If not, download and install it from the Go website.
-
Build the Project
Build the project using the Go build command:
go build -o todo
This will create an executable file named
todo
in the project directory.
Here are the commands you can use with the Todo-CLI-Go tool:
Command | Description |
---|---|
./todo -add "task" |
Add a new to-do item |
./todo -list |
List all to-do items |
./todo toggle <id> |
Mark a to-do item as done |
./todo edit "<id> new_name" |
Edit the name of an existing to-do item |
-
Add a new to-do item:
./todo -add "Buy groceries"
-
List all to-do items:
./todo -list
-
Mark a to-do item as done:
./todo toggle 1
-
Edit a to-do item:
./todo edit "1 Buy groceries and more"