Skip to content

hdahlheim/hakuna-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hakuna Go

Hakuna Go is an unofficial CLI for the time-tracking tool Hakuna.

Installation

curl -sLO https://github.com/hdahlheim/hakuna-go/releases/latest/download/hakuna-go-macos-amd64
chmod +x hakuna-go-macos-amd64
mv hakuna-go-macos-amd64 hakuna

Usage

The simplest way to use the CLI is to export two environment variables with your hakuna company subdomain and your api token.

export HAKUNA_CLI_SUBDOMAIN="my-company-subdomain"
export HAKUNA_CLI_API_TOKEN="xxxxxxxxxxxxxxxxxxxx"
# then you can use the CLI to start a timer
hakuna timer start --taskId=2 --note="Building cool stuff!"

If you don't want to use environment variables you can use the .hakuna.yaml config file. The CLI searches for the config file in two places, first in the current directory and after that in the user home directory.

Example using the config file:

cat << EOF > ~/.hakuna.yaml
subdomain: my-company-subdomain
api_token: xxxxxxxxxxxxxxxxxxxx
default:
  task_id: 2
EOF

Now you can start a timer without specifying a taskId

hakuna timer start

The CLI looks for a config in the current directory first. If no config exits it fallsback to the config in the home directory.

You can check which config is being used by providing the --debug flag.

NOTE: Environment variables take presidency over the config file.