Skip to content

Darkflib/CAH-addon-gen

Repository files navigation

Cards Against Humanity Addon Generator

A Python tool that generates themed addon packs for the popular party game "Cards Against Humanity" using Google's Gemini AI model.

Overview

This project uses Google's Gemini AI to create custom Cards Against Humanity addon packs based on specified topics. It generates both black cards (prompts with blanks) and white cards (responses or answers).

Features

  • Generate themed Cards Against Humanity card packs
  • Customizable topic selection
  • Outputs card packs in JSON format
  • Automatically timestamps generated files

Requirements

  • Python 3.11+
  • Google Gemini API key

Installation

  1. Clone the repository:

    git clone https://github.com/darkflib/CAH-addon-gen.git
    cd CAH-addon-gen
  2. Create a virtual environment and activate it:

    uv venv
    . .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies:

    uv pip install -r requirements.txt
  4. Create a .env file in the project root with your Google Gemini API key:

    GEMINI_API_KEY=your_api_key_here
    

Usage

Run the script from the command line:

python CAH-gen.py

By default, this will generate a "Site Reliability Engineering (SRE) and DevOps" themed pack with:

  • 20 black cards (prompts)
  • 40 white cards (responses)

The generated pack will be saved as a JSON file with a timestamp in the format: CAH_[topic]-[timestamp].json

Customizing

To generate a pack with a different theme, modify the topic variable in the script or adapt the code to accept command-line arguments.

Output Format

The generated JSON file has the following structure:

{
  "black": [
    "When the production server goes down, I always blame ____.",
    "Our CI/CD pipeline would be perfect if it weren't for ____.",
    ...
  ],
  "white": [
    "Turning it off and on again.",
    "A mysterious CPU spike at 3 AM.",
    ...
  ]
}

License

MIT

Author

Mike (darkflib@gmail.com)

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages