A simple command-line application for managing tasks using Go. This CLI app allows users to perform CRUD operations on tasks, including adding, listing, completing, and deleting tasks.
- Add new tasks
- List all tasks (completed and uncompleted)
- Mark tasks as complete
- Delete tasks
- Go 1.16 or higher
-
Clone the repository:
git clone https://github.com/m3hu1/golang-todo-cli.git
-
Navigate into the cloned repo:
cd golang-todo-cli
-
Install dependencies:
go mod tidy
-
(Optional) Build the executable:
go build -o tasks
You can run the application using the following commands:
./tasks add "Your task description"
To list all uncompleted tasks:
./tasks list
To list all tasks (including completed ones):
./tasks list --all
To mark a task as complete, use its ID:
./tasks complete <taskid>
To delete a task by its ID:
./tasks delete <taskid>
-
Add tasks:
./tasks add "Buy groceries" ./tasks add "Clean the house"
-
List tasks:
./tasks list
-
Complete a task (e.g., ID 1):
./tasks complete 1
-
List all tasks:
./tasks list --all
-
Delete a task (e.g., ID 2):
./tasks delete 2
Feel free to open issues or submit pull requests. Contributions are welcome!