Quiz Maker 2 (QM2) - Interactive Terminal Quiz Application
Quiz Maker 2 (QM2) is a robust, interactive terminal-based quiz engine built with Python. Designed for developers and power users, it now features AI-powered quiz generation, allowing you to create comprehensive study materials in seconds using Google's Gemini AI. It features a modern UI, extensive import/export capabilities, and a high-performance core.
Gameplay
Key Features
- AI Quiz Generation: Instantly generate quizzes on any topic using Google Gemini
- 4 Question Types: Multiple Choice, True/False, Fill-in-the-blank, Matching
- Timed Quiz Sessions: Customizable timeout settings with real-time feedback
- Flashcards Mode: Study mode for reviewing questions without scoring
- Score Tracking: Comprehensive statistics and performance analytics
- Category Management: Organize questions into hierarchical categories
- Import/Export: Convert between CSV and JSON formats
- Remote Import: Download quiz files directly from URLs
- Rich Terminal UI: Beautiful, colored interface using Rich library
- Performance Optimized: Caching system for large question sets
- Cross-Platform: Works on Windows, macOS, and Linux
Flashcards Mode
AI Generation Support
QM2 integrates with Google Gemini to automate quiz creation. You can generate professional-grade questions by simply providing a topic.
Setup
- Get a free API key from Google AI Studio.
- Export it to your environment:
- Linux/macOS: export GEMINI_API_KEY='...'
- Windows (CMD): set GEMINI_API_KEY=...
- Windows (PowerShell): $env:GEMINI_API_KEY='...'
AI Features
- Smart Retries: Automatic fallback between models (Gemini 2.0 Flash -> 1.5 Flash -> 1.5 Pro) if one is unavailable.
- Rate Limit Handling: Built-in exponential backoff to handle API quotas gracefully.
- Topic-to-Quiz: Generates all 4 question types (including complex Matching) with high accuracy.
Support
- Email: halvadzija.adnan@gmail.com
- Issues: GitHub Issues
Links
- PyPI: https://pypi.org/project/qm2/
- GitHub: https://github.com/ahalvadzija/qm2
- Documentation: https://ahalvadzija.github.io/qm2
Created by: Adnan Halvadžija
⭐ If you find this project useful, please give it a star on GitHub!
!!! love "Acknowledgments" QM2 wouldn't be as beautiful or interactive without:
* [Rich](https://github.com/Textualize/rich)
* [Questionary](https://github.com/tmbo/questionary)