hakuna-go

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2022 License: MPL-2.0 Imports: 1 Imported by: 0

README

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.

Documentation

Overview

Copyright © 2021 Henning Dahlheim <hactar@cyberkraft.ch>

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

Directories

Path Synopsis
internal
lib
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL