We provide the best roasts.
Install ollama. See the ollama installation guide.
To install the dependencies, run:
conda create -n roaster python=3.12Then activate the environment:
conda activate roasterInstall the requirements:
pip install -r requirements.txtWe are using Ollama to serve local LLMs:
sudo snap install ollamaIf you want to use the speech output feature, you need to install espeak-ng. You can do this by running:
sudo apt-get -y install espeak-ngTo authenticate to services, you can either export env vars in your shell or create a .env file at the project root (see .env.example).
For GitHub profile roasting:
export GITHUB_TOKEN=your_token_hereIf you plan to use the OpenAI Python client in the future (not required for Ollama):
export OPENAI_API_KEY=your_openai_api_key_heresudo docker compose up --buildPull your favourite LLM:
ollama pull mistral:latestTo run the application, use:
streamlit run main.pyWe support purchasing "pay-it-forward" credits (roasts) via Stripe Checkout. Credits are used to generate code roasts. Before you begin, register for a free Stripe account at https://dashboard.stripe.com/register. In the Dashboard, toggle “Viewing test data” (top right) to work in Test mode.
Add the following variables to your .env file (or export in your shell):
# Stripe API Keys (get these from your Stripe Dashboard)
STRIPE_SECRET_KEY=sk_test_your_secret_key_here
STRIPE_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
# Your Stripe webhook signing secret (from Developers → Webhooks → your endpoint)
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_hereFollow Stripe's CLI install guide for your platform, or use Docker:
- macOS (Homebrew):
brew install stripe/stripe-cli/stripe
- Debian/Ubuntu (apt):
curl -sS https://packages.stripe.dev/debian/checkout/install.sh | sudo bash sudo apt-get install stripe - RHEL/CentOS (yum):
curl -sS https://packages.stripe.dev/rpm/checkout/install.sh | sudo bash sudo yum install stripe - Windows (Scoop):
scoop install stripe
- Or via Docker (no local install required):
docker run --rm -it stripe/stripe-cli:latest listen --forward-to localhost:5030/webhook
After installation or Docker launch, authenticate your CLI session (if installed locally):
stripe loginUse the Stripe CLI to forward events to your local FastAPI server:
stripe listen --forward-to localhost:5030/webhookThis will print out a webhook signing secret (whsec_...) and forward checkout.session.completed events to http://localhost:5030/webhook.
- Start your FastAPI server (default at port 5030).
- Open the web UI, enter a dollar amount and click Pay & Buy Roasts, then complete the test checkout.
- After payment, the CLI will forward the webhook and your local DB will increment the roast counter.
Use Stripe’s Test mode (Dashboard toggle “Viewing test data”). In Checkout, try:
- 4242 4242 4242 4242 — successful payment
- 4000 0000 0000 9995 — generic decline
- 4000 0000 0000 3220 — requires 3D Secure authentication
- Start your FastAPI server (default at port 5030).
- Open the web UI, click Buy Credits, and complete the test checkout.
- After payment, the CLI will forward the webhook and your local DB will increment the credit counter.
Now you’re all set to accept test payments and see credits update in real-time!
We've added a stripe-cli service to docker-compose.yml that will forward webhooks from Stripe into your local FastAPI server, with login state persisted across restarts.
- Perform a one-time login in the Stripe CLI container (credentials are stored in a Docker volume):
docker compose run --rm stripe-cli loginThis will open the Stripe authentication flow; follow the prompts to log in.
- Start (or restart) all services, including stripe-cli:
docker compose up --buildThe stripe-cli container will now automatically forward checkout.session.completed events to http://localhost:5030/webhook.