2023-04-14 13:54:48 +00:00
|
|
|
King of Time CLI
|
2023-04-14 13:13:50 +00:00
|
|
|
=================
|
|
|
|
|
|
|
|
<!-- toc -->
|
|
|
|
* [Usage](#usage)
|
2023-04-15 10:01:03 +00:00
|
|
|
* [Installation](#installation)
|
2023-04-14 13:13:50 +00:00
|
|
|
* [Commands](#commands)
|
|
|
|
<!-- tocstop -->
|
2023-04-15 10:01:03 +00:00
|
|
|
|
2023-04-14 13:13:50 +00:00
|
|
|
# Usage
|
2023-04-14 13:54:48 +00:00
|
|
|
|
2023-04-15 10:01:03 +00:00
|
|
|
```sh-session
|
|
|
|
$ kot checkin
|
|
|
|
TODO example output
|
|
|
|
|
|
|
|
$ kot checkout
|
|
|
|
TODO example output
|
|
|
|
```
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
|
|
|
From the same directory as this README:
|
2023-04-14 13:54:48 +00:00
|
|
|
|
2023-04-14 13:13:50 +00:00
|
|
|
```sh-session
|
2023-04-15 10:41:03 +00:00
|
|
|
$ npm run setup
|
2023-04-14 13:13:50 +00:00
|
|
|
```
|
2023-04-15 10:01:03 +00:00
|
|
|
|
|
|
|
Now the `kot` command should be available on your system.
|
|
|
|
|
|
|
|
## Set Tokens
|
|
|
|
|
|
|
|
You need to provide two tokens, which can be retrieved by inspecting the HTTP request to `/bprgateway` the
|
|
|
|
King of Time Web UI makes when submitting a check-in or check-out request.
|
|
|
|
|
|
|
|
It is convenient to set these as the below environment variables, although they can also be passed as options
|
|
|
|
to the `checkin` and `checkout` commands.
|
|
|
|
|
|
|
|
* `KINGOFTIME_TOKEN`
|
|
|
|
* `KINGOFTIME_USER_TOKEN`
|
2023-04-14 13:13:50 +00:00
|
|
|
# Commands
|
|
|
|
<!-- commands -->
|
2023-04-14 15:14:07 +00:00
|
|
|
* [`kot checkin`](#kot-checkin)
|
|
|
|
* [`kot checkout`](#kot-checkout)
|
2023-04-14 13:13:50 +00:00
|
|
|
* [`kot help [COMMANDS]`](#kot-help-commands)
|
|
|
|
|
2023-04-14 15:14:07 +00:00
|
|
|
## `kot checkin`
|
2023-04-14 13:13:50 +00:00
|
|
|
|
2023-04-14 15:14:07 +00:00
|
|
|
Check in
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
USAGE
|
2023-04-14 15:14:07 +00:00
|
|
|
$ kot checkin --token <value> --user-token <value>
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
FLAGS
|
2023-04-14 15:14:07 +00:00
|
|
|
--token=<value> (required) Defaults to the KINGOFTIME_TOKEN environment variable.
|
|
|
|
--user-token=<value> (required) Defaults to the KINGOFTIME_USER_TOKEN environment variable.
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
2023-04-14 15:14:07 +00:00
|
|
|
Check in
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
2023-04-14 13:54:48 +00:00
|
|
|
$ kot checkin
|
2023-04-14 13:13:50 +00:00
|
|
|
```
|
|
|
|
|
2023-04-14 15:14:07 +00:00
|
|
|
## `kot checkout`
|
2023-04-14 13:13:50 +00:00
|
|
|
|
2023-04-14 15:14:07 +00:00
|
|
|
Check out
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
```
|
|
|
|
USAGE
|
2023-04-14 15:14:07 +00:00
|
|
|
$ kot checkout --token <value> --user-token <value>
|
2023-04-14 13:54:48 +00:00
|
|
|
|
|
|
|
FLAGS
|
2023-04-14 15:14:07 +00:00
|
|
|
--token=<value> (required) Defaults to the KINGOFTIME_TOKEN environment variable.
|
|
|
|
--user-token=<value> (required) Defaults to the KINGOFTIME_USER_TOKEN environment variable.
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
DESCRIPTION
|
2023-04-14 15:14:07 +00:00
|
|
|
Check out
|
2023-04-14 13:13:50 +00:00
|
|
|
|
|
|
|
EXAMPLES
|
2023-04-14 13:54:48 +00:00
|
|
|
$ kot checkout
|
2023-04-14 13:13:50 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## `kot help [COMMANDS]`
|
|
|
|
|
|
|
|
Display help for kot.
|
|
|
|
|
|
|
|
```
|
|
|
|
USAGE
|
|
|
|
$ kot help [COMMANDS] [-n]
|
|
|
|
|
|
|
|
ARGUMENTS
|
|
|
|
COMMANDS Command to show help for.
|
|
|
|
|
|
|
|
FLAGS
|
|
|
|
-n, --nested-commands Include all nested commands in the output.
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
Display help for kot.
|
|
|
|
```
|
|
|
|
|
|
|
|
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.9/src/commands/help.ts)_
|
|
|
|
<!-- commandsstop -->
|
2023-04-14 14:22:39 +00:00
|
|
|
|
|
|
|
## Credits
|
|
|
|
|
|
|
|
Inspired by https://github.com/inabajunmr/kotrcli
|