Skip to content

2. Configure Credentials

Time: ~1 minute

You need to tell the tool where your Supabase project lives. There are two things to configure:

  • config.js — used by the browser (presenter and student pages)
  • Environment variables — used by the Python CLI

The setup script handles both.


Run the setup script

cd supabase-live-quiz
chmod +x configure.sh
./configure.sh

It will ask for the two values you copied in the previous step:

Supabase URL (https://xxxxx.supabase.co): https://abcdefg.supabase.co
Supabase anon (public) key: eyJ...

This creates config.js with your credentials and prints the export commands for the CLI.

Set environment variables for the CLI

Copy the two export lines the script printed and run them:

export SUPABASE_URL='https://abcdefg.supabase.co'
export SUPABASE_KEY='eyJ...'

Make it permanent

Add those two lines to your ~/.zshrc (Mac) or ~/.bashrc (Linux) so you don't have to re-enter them every time you open a terminal.

Install the Python dependency

pip install supabase

Manual setup (without the script)

If you prefer not to use configure.sh:

  1. Copy the template: cp config.example.js config.js
  2. Open config.js and replace the placeholder values with your URL and key
  3. Set the environment variables manually (see above)

Next: 3. Create Your First Quiz