open-index/open-npm huggingface dataset:
npm package: @machellerogden/textgame
Description: Textastic AI Gaming
Author: Mac Heller-Ogden
Latest version: 0.0.4

# textgame

## Install

```
npm i -g textgame
```

## Server

```
$ textgame-server
```

## Client

```
$ textgame
```

## Chat Mode

### OpenAI API Key

You'll need an OpenAI API key if you want to use chat-mode—which you do.

Plug your key into the `.env` file and you're good to go.

I prefer not to save secrets in plaintext, ever. Instead, I like to use the One Password CLI to inject what I need into my tty's env.

One Password allows a vault address to be used in place of the secret value,
like so:

#### .env

```sh
OPENAI_API_KEY="op://services/openai-creds/api-key"
OPENAI_API_ORG="op://services/openai-creds/org"
```

#### Source secrets

```sh
set -a
source <(op inject -i .env)
set +a
```

#### Or, use `op run`

```sh
op run --no-masking --env-file=./.env textgame-server
```

# License

Apache-2.0