Skip to content

DulanDev/go-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager CLI in Go 📟

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.

What you can do

  • 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.

Getting Started

Prerequisites

  • Go 1.21.2 or later
  • SQLite

Installation

  1. Clone the repository:

    git clone https://github.com/dulanhewage/go-task.git
    cd go-task
  2. Install dependencies:

    go mod tidy
  3. Build the project:

    go build -o go-task

Configuration

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 tests

Run all tests:

go test ./cmd/...

Run a specific test file:

go test ./cmd/add_test.go

Run tests with verbose output:

go test -v ./cmd/...

Usage

After building the project, you can use the CLI tool by running the generated binary:

./go-task --help

Examples

Here is an example of how to use the Task Manager CLI:

  1. Add a new task (Simple):
./go-task add --title "Buy groceries" --description "Milk, Bread, Eggs"
  1. 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.

  1. List all tasks:
./go-task list

Displays tasks in a table format, sorted by Priority (High -> Low).

  1. Update a task:
./go-task update --id 1 --title "Buy groceries and fruits" --description "Milk, Bread, Eggs, Apples"
  1. Mark a task as completed:
./go-task complete --id 1
  1. Search tasks by keyword:
./go-task search --keyword "groceries"
  1. Delete a task:
./go-task delete --id 1

About

Go-powered task manager that lives in your shell. 📟

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages