2 stable releases
1.0.3 | Nov 21, 2024 |
---|
#697 in Command line utilities
271 downloads per month
130KB
829 lines
🔮 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?
📖 Prepare
To get started, prepare two text files:
- Words to Link Together - Contains the words from your own team.
- 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
Dependencies
~20–34MB
~520K SLoC