You can download the executables from the Releases page.
Run a local posrtgres instance:
docker-compose up
Open a new termial and run:
export DATABASE_URI="postgresql://localhost/postgres?user=postgres&password=mypassword&sslmode=disable"
go run main.go -q "select * from users" | tee output.csv
# or use the executable on MacOS for example
./sql2csv-amd64-darwin -q "select * from users" | tee output.csv