Skip to content

Commit

Permalink
chore: update README
Browse files Browse the repository at this point in the history
  • Loading branch information
hdahlheim committed Jan 2, 2022
1 parent a1e2cb7 commit 6c850c0
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.

0 comments on commit 6c850c0

Please sign in to comment.