go-task is a lightweight command‑line task manager written in Go and backed by SQLite. It lets you capture, organize, and track your tasks with priorities, tags, and completion status directly from your terminal.
- Add tasks with title, description, priority, and tags.
- View tasks in a readable table, sorted by priority.
- Update task details as your work evolves.
- Mark tasks as completed to track progress.
- Delete tasks you no longer need.
- Search tasks quickly using keywords.
- Go 1.21.2 or later
- SQLite
-
Clone the repository:
git clone https://github.com/dulanhewage/go-task.git cd go-task -
Install dependencies:
go mod tidy
-
Build the project:
go build -o go-task
You can configure the database file path by creating a config.json file in the project root:
{
"db_file": "my_tasks.db"
}If config.json is missing or db_file is not specified, it defaults to tasks.db.
Run all tests:
go test ./cmd/...Run a specific test file:
go test ./cmd/add_test.goRun tests with verbose output:
go test -v ./cmd/...After building the project, you can use the CLI tool by running the generated binary:
./go-task --helpHere is an example of how to use the Task Manager CLI:
- Add a new task (Simple):
./go-task add --title "Buy groceries" --description "Milk, Bread, Eggs"- Add a task with Priority and Tags:
./go-task add --title "Fix server bug" --description "Crash on startup" --priority High --tags "work,urgent,dev"Note: Priorities can be High (H), Medium (M), or Low (L). Tags are comma-separated.
- List all tasks:
./go-task listDisplays tasks in a table format, sorted by Priority (High -> Low).
- Update a task:
./go-task update --id 1 --title "Buy groceries and fruits" --description "Milk, Bread, Eggs, Apples"- Mark a task as completed:
./go-task complete --id 1- Search tasks by keyword:
./go-task search --keyword "groceries"- Delete a task:
./go-task delete --id 1