1. Store Secrets Locally
Live API calls need credentials outside the repository.
Qualtrics documents API tokens under Account Settings, in the Qualtrics IDs area: Qualtrics API overview.
On Windows PowerShell, create $HOME\.secrets\qualtrics.env.ps1:
$env:QUALTRICS_DATACENTER = "your_datacenter"
$env:QUALTRICS_API_TOKEN = "your_token"
$env:QUALTRICS_PUBLIC_HOST = "yourbrand.qualtrics.com"
Load it before live API calls:
. $HOME\.secrets\qualtrics.env.ps1
On macOS/Linux, create $HOME/.secrets/qualtrics.env:
export QUALTRICS_DATACENTER="your_datacenter"
export QUALTRICS_API_TOKEN="your_token"
export QUALTRICS_PUBLIC_HOST="yourbrand.qualtrics.com"
Load it before live API calls:
source "$HOME/.secrets/qualtrics.env"
2. Run The Live Teaching Loop
Codex should ask before each live API action. The command shape is:
python scripts/qualtrics_workflow.py check-auth
python scripts/qualtrics_workflow.py create-survey --survey-key my_survey --survey-name "My Survey" --spec-file code/my_survey/survey_spec.json
python scripts/qualtrics_workflow.py get-link --survey-key my_survey --write-slide-inputs
python scripts/generate_synthetic_responses.py --survey-key my_survey --output build/fixtures/my_survey_responses.csv --n 100
python scripts/qualtrics_workflow.py submit-synthetic-responses --survey-key my_survey --input build/fixtures/my_survey_responses.csv
python scripts/qualtrics_workflow.py export-responses --survey-key my_survey --format csv
python scripts/run_analysis.py --survey-key my_survey
python scripts/build_slides.py --survey-key my_survey
Use CSV for Python analysis. Use SPSS/SAV with --format spss when the local preference is Stata.
Qualtrics CSV exports may include metadata rows after the header. The example analysis filters them when ResponseId exists by keeping IDs that start with R_.
Public Boundary
Publish synthetic/demo artifacts freely. Do not publish raw exports, processed real data, survey links, metadata, or secrets by default. Reusable links saved by get-link are local/private by default.
Draft or inactive surveys may still accept API-created test responses. Treat API response submission as a live mutation.