mastermind-cli

Crates.iomastermind-cli
lib.rsmastermind-cli
version1.0.3
sourcesrc
created_at2024-11-21 20:33:54.396092
updated_at2024-11-21 20:42:43.693402
descriptionAn LLM-powered CLI tool to help you be a better spymaster in Codenames
homepage
repositoryhttps://github.com/theoforger/mastermind
max_upload_size
id1456695
size231,445
TheoForger (theoforger)

documentation

README

🔮 Mastermind - A Second Brain for Spymasters

Mastermind is a CLI tool designed to generate clue words for spymasters in the game of Codenames, leveraging large language models (LLMs) of your choice!

Written in Rust 🦀, because why not?

GitHub License GitHub Actions Workflow Status

A gif demo of the basic functions of this program.

📖 Prepare

To get started, prepare two text files:

  1. Words to Link Together - Contains the words from your own team.
  2. Words to Avoid - Contains:
    • Your opponent's words
    • Neutral words
    • The assassin word

One word per line. Refer to the examples directory for sample files.

🛠️ Configure

Here are what you need to configure before running mastermind:

  • API key
  • The base URL of an OpenAI-compatible API
  • A default language model

There are two ways to configure this program:

Config File

During the first run, a config file will be created at your system's preferred location. The specific location will be given in the output. Generally, it is located at:

  • For Linux: $HOME/.config/mastermind/config.toml
  • For macOS: $HOME/Library/Application Support/mastermind/config.toml
  • For Windows: C:\Users\[your username]\AppData\Roaming\mastermind\config.toml

Environment Variables

Simply pass these environment variables during run time:

  • API_KEY

  • OPENAI_API_BASE_URL

  • DEFAULT_MODEL_ID

🏃 Run

mastermind [TO_LINK] [TO_AVOID]

Feel free to run the program multiple times to get the best result!

Options

  • -g, --get-models : Print all available language models
  • -m, --set-models : Select language model(s)
  • -o, --output : Specify an output file
  • -t, --token-usage : Print token usage
  • -h, --help : Print help
  • -V, --version : Print version
Commit count: 171

cargo fmt