0.0.4 • Published 2 months ago

@machellerogden/textgame v0.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

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

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

Source secrets

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

Or, use op run

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

License

Apache-2.0