diff --git a/README.md b/README.md index 8314328..34deb94 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,32 @@ # Hakuna Go -Hakuna Go is a cli for the timetracking tool [Hakuna](https://hakuna.ch). +Hakuna Go is an unofficial CLI for the time-tracking tool [Hakuna](https://hakuna.ch). + +## Installation + +```shell +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 +The simplest way to use the CLI is to export two environment variables with your hakuna company subdomain and your api token. ```shell 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!" ``` -Or using the `.hakuna.yaml` config file +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, the first in the current directory and +after that in the user home directory. + +Example using the config file: ```shell cat << EOF > ~/.hakuna.yaml @@ -31,9 +43,9 @@ Now you can start a timer without specifying a taskId hakuna timer start ``` -The cli looks for a config in the current directory first. +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 it uses by providing the `--debug` flag. +You can check which config is being used by providing the `--debug` flag. -Environment variables take presidency over the config file. +NOTE: Environment variables take presidency over the config file.