A simple command-line tool built in Golang to track your tasks efficiently.
https://roadmap.sh/projects/task-tracker/solutions?u=64c9f625c3203c8793246c7f
- Build the application:
go build -o task-cli
- Move the executable to
/usr/local/bin/
for system-wide access:sudo mv task-cli /usr/local/bin/
For Windows, here are the steps to build and install your Go application:
-
Build the application: If you have Go installed, you can build the application by opening a command prompt (or PowerShell) in the directory where your Go code is located and running:
go build -o task-cli.exe
This will generate the
task-cli.exe
executable. -
Move the executable to a directory in your PATH: To make the application accessible system-wide, you should move it to a directory that's included in your
PATH
. Common directories for this purpose areC:\Program Files
orC:\Users\<your_username>\go\bin
, but you can choose another directory.You can manually move the
task-cli.exe
or use the command line:move task-cli.exe C:\path\to\desired\directory\
For example:
move task-cli.exe C:\Users\<your_username>\go\bin\
-
Ensure the directory is in your PATH: If the directory where you moved the executable is not already in your
PATH
, you can add it by following these steps:- Right-click on
This PC
orComputer
, and select Properties. - Click on Advanced system settings on the left side.
- In the System Properties window, click on the Environment Variables button.
- Under System variables, scroll down and select the
Path
variable, then click Edit. - Click New and add the path to the directory where you moved
task-cli.exe
(e.g.,C:\Users\<your_username>\go\bin\
). - Click OK to save the changes.
- Right-click on
After these steps, you should be able to run task-cli
from any command prompt or PowerShell window.
To add a new task, use the following command:
task-cli add <task_description>
Example:
task-cli add Buy groceries
Output:
Task added successfully (Index: 1)
To update an existing task (using its Index), run:
task-cli update <index> <new_task_description>
Example:
task-cli update 1 Buy groceries and cook dinner
To delete a task by Index:
task-cli delete <index>
Example:
task-cli delete 1
To mark a task as in progress:
task-cli mark-in-progress <index>
To mark a task as done:
task-cli mark-done <index>
To list all tasks, simply use:
task-cli list
You can filter tasks by status:
-
List all completed tasks:
task-cli list done
-
List all tasks yet to be started:
task-cli list todo
-
List tasks that are in progress:
task-cli list in-progress
Feel free to fork the repository, submit issues, or create pull requests. Contributions are welcome!