Add more instructions to the README

This commit is contained in:
Adam Millerchip 2023-04-15 19:01:03 +09:00
parent e882a980c5
commit 6035d26824

View file

@ -3,25 +3,41 @@ King of Time CLI
<!-- toc --> <!-- toc -->
* [Usage](#usage) * [Usage](#usage)
* [Installation](#installation)
* [Commands](#commands) * [Commands](#commands)
<!-- tocstop --> <!-- tocstop -->
# Usage # Usage
TODO add instructions for setting tokens.
<!-- usage -->
```sh-session ```sh-session
$ npm install -g kingoftime-cli $ kot checkin
$ kot COMMAND TODO example output
running command...
$ kot (--version) $ kot checkout
kingoftime-cli/0.0.0 darwin-x64 node-v18.15.0 TODO example output
$ kot --help [COMMAND]
USAGE
$ kot COMMAND
...
``` ```
<!-- usagestop -->
# Installation
From the same directory as this README:
```sh-session
$ npm run build
$ npm link
```
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`
# Commands # Commands
<!-- commands --> <!-- commands -->
* [`kot checkin`](#kot-checkin) * [`kot checkin`](#kot-checkin)