Skip to content

⚙️ BUILD

Igor Perkovic edited this page Jul 22, 2026 · 8 revisions

Process

1. 📥 Clone the Repository

Open terminal app in the folder where you will download the code (Downloads) and type:

git clone https://github.com/igorp74/WhatToDo.git
cd ToDo

2. 📦 Install dependencies

Make sure Go is installed on your machine, then initialize app

go mod init whattodo/app

Now, we will add all necessary dependencies:

go mod tidy

3. ⚙️ Build the application

Linux environment

Usual build

go build -o todo .

More optimal build - for a smaller binary size

CGO_ENABLED=0 go build -ldflags="-s -w" -o todo  

Copy your binary to the system path

sudo cp todo /usr/local/bin

Windows environment

Usual build

go build -o todo.exe .

More optimal build - for a smaller binary size (this one is on Manjaro for Windows)

GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" -o todo.exe .

After build is done, either move executable into a folder on declared path, or add your path to the environment variable:

setx /M PATH "%PATH%;<your-new-path>"

4. 🚀 Start the application

todo add -t "Test"

This last step will create todo.db in your home folder

Clone this wiki locally