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
1 changed files with 29 additions and 13 deletions

View File

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