Skip to main content

Run markdown quizzes in the terminal

Project description

quizmd

quizmd is a terminal quiz app for:

  • Markdown MCQs (single/multiple)
  • Imposter quizzes (spot misleading options)
  • Chaos quizzes (branch + recovery scenarios)
  • Essay quizzes (AI rubric scoring)
  • Online room types (compete/collaborate/eliminate)
  • Terminal game modes (Alien Attack)

Install

Recommended:

pip install quizmd

Update to latest:

pip install -U quizmd

From GitHub (latest repo state):

pip install "git+https://github.com/steliosot/quizmd.git"

Check install:

quizmd --version

Quick Start

Create starter files:

quizmd init

This creates:

  • hello-quiz.md (single + multiple MCQ)
  • hello-imposter.md (imposter mode)
  • hello-chaos.md (branching scenario mode)
  • hello-essay.md (essay mode)
  • QUIZ_GUIDE.md (quick commands)

Run starters:

quizmd --validate hello-quiz.md
quizmd hello-quiz.md

quizmd --validate hello-imposter.md
quizmd hello-imposter.md

quizmd --validate hello-chaos.md
quizmd hello-chaos.md

quizmd --validate hello-essay.md
export GEMINI_API_KEY="your_key_here"  # or OPENAI_API_KEY / ANTHROPIC_API_KEY
quizmd hello-essay.md

Modes (What + How to Start)

1) Classic MCQ (Local)

  • What: single/multiple-choice timed quiz.
  • Start: quizmd hello-quiz.md

2) Imposter (Local)

  • What: select correct answers and flag misleading options.
  • Start: quizmd hello-imposter.md

3) Debug (Local)

  • What: fix broken Python code with line-aware scoring.
  • Start: quizmd hello-debug.md

4) Challenge (Local)

  • What: category board + risk levels (stars scoring).
  • Start: quizmd hello-challenge.md

5) Reverse (Local)

  • What: infer code behavior/output in reverse-engineering style MCQs.
  • Start: quizmd hello-reverse.md

6) Millionaire (Local)

  • What: 15-question ladder with lifelines and safety nets.
  • Start: quizmd hello-millionaire.md

7) Chaos (Local)

  • What: branch + recovery scenario that rejoins at final decision.
  • Start: quizmd hello-chaos.md

8) Essay (Local + AI)

  • What: write a short response and get rubric feedback.
  • Start: quizmd hello-essay.md

9) Room: Compete (Online)

  • What: fastest correct answers win points.
  • Start room: quizmd room --create --mode compete --quiz hello-quiz.md

10) Room: Collaborate (Online)

  • What: discussion + voting phase, team consensus scoring.
  • Start room: quizmd room --create --mode collaborate --quiz hello-quiz.md

11) Room: Eliminate (Online)

  • What: wrong answers eliminate players from scoring, but everyone keeps playing for practice.
  • Start room: quizmd room --create --mode eliminate --quiz hello-quiz.md

12) Game: Alien Attack (Terminal)

  • What: arcade shooter mini-game.
  • Start: quizmd alien-attack

Join any room:

quizmd room --join <room-name> [--token <room-token>]

Room quiz requirement:

  • In online room types, each question Time/time_limit must be 5 seconds or higher.
  • For JSON room quizzes, optional discussion_time (seconds) controls collaborate chat phase per question.

quizmd init Coverage

Yes, quizmd init covers all mode types:

  • MCQ single/multiple via hello-quiz.md
  • Imposter via hello-imposter.md
  • Chaos via hello-chaos.md
  • Essay via hello-essay.md
  • Room types by using hello-quiz.md with --mode compete|collaborate|eliminate

Essay Keys (Essay Mode Only)

MCQ quizzes do not require API keys.

Supported keys:

  • GEMINI_API_KEY
  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY

Auto provider order:

  1. Gemini
  2. OpenAI
  3. Anthropic

Mac/Linux example:

export GEMINI_API_KEY="your_key_here"

Windows PowerShell example:

$env:GEMINI_API_KEY="your_key_here"

Validate Any Quiz

quizmd --validate quizzes/harry-potter-quiz.md

Theme

quizmd --theme auto quizzes/harry-potter-quiz.md
quizmd --theme light quizzes/harry-potter-quiz.md
quizmd --theme dark quizzes/harry-potter-quiz.md

Notes

  • Local question modes support Q for graceful quit with summary.
  • Press Ctrl+C at any time to exit.
  • Each multiple-choice question must have at least 2 non-empty options.
  • If your question text includes markdown bullet lines, add an Options: line before answer choices to disambiguate parsing.

Development

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python -m pytest tests -q

Related Repositories

This repository is the CLI/PyPI package.

Community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quizmd-2.4.3rc21.tar.gz (131.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quizmd-2.4.3rc21-py3-none-any.whl (96.4 kB view details)

Uploaded Python 3

File details

Details for the file quizmd-2.4.3rc21.tar.gz.

File metadata

  • Download URL: quizmd-2.4.3rc21.tar.gz
  • Upload date:
  • Size: 131.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quizmd-2.4.3rc21.tar.gz
Algorithm Hash digest
SHA256 fd6c507eb0ea1d12260d35451a5ce24553dd74e4535fba8a2d0e5653970700dc
MD5 cfc894bda42bb6d561993f8b9bf1f397
BLAKE2b-256 4029154a395e04a34726fa088b4fde671137045da9bd3e5676d0bea2eb282fa7

See more details on using hashes here.

File details

Details for the file quizmd-2.4.3rc21-py3-none-any.whl.

File metadata

  • Download URL: quizmd-2.4.3rc21-py3-none-any.whl
  • Upload date:
  • Size: 96.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quizmd-2.4.3rc21-py3-none-any.whl
Algorithm Hash digest
SHA256 9a4f66edb7c34368c2066154dbb669c0a6d5e82860d610714b883772c8a0b060
MD5 85947b0db4a77e262ce2563efa6a6e74
BLAKE2b-256 97d1e4303706c70f60c28d88b735b45d3605ecd44eac015943a5317ba2239403

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page