This CLI tool will let you create multiple todos and each todo can have one or many items. If you want to use multiple words either for naming the todo or the item, then you need to use the double quotes around the todo name or item.
Clone the repo and run go build. This will create an executable file with name todo.
-
Create one or more todo's with the following command
./todo create [todoName]
ex.:
./todo create todo1 "new todo"- Multiple todosex.:
./todo create todo2- Single todoThis will create data folder in the root and create text files with the given names.
-
To list the todo's, run the following command:
./todo list
This will display list of all the todos created under data folder. Display all the text file names.
-
You can delete a todo using the following command:
./todo delete [todoName]
ex.:
./todo delete todo1This will delete the entire text file from the data folder.
NOTE: To work with todo items, you need to know the todo/file name. All the item commands need the todo name.
-
To add individual items to a todo, run the following command:
./todo -n [todoName] item add [itemName]
ex.:
./todo -n todo1 item add "This is a test" TestItemThis will add the given items into the todo1.txt
-
To view the items of a todo, use the following command:
./todo -n [todoName] item list
ex.:
./todo -n todo1 item list