ansrcli quickly generates quizzes from lecture notes by using Google's Gemini to analyze the source file and produce a balanced set of questions, including true/false, short answer, and multiple-choice, in seconds. Once you finish a quiz, your answers are graded and feedback is provided on what you could have done better.
We hope this tool is helpful for students going through through their education journey.
- Frontend: React, TypeScript, Ink (React renderer for CLI)
- AI Integration: Google Gemini API
- Parse: Extracts text content from your PDF
- Generate: Sends content to Gemini AI to create balanced quiz questions (multiple choice, true/false, short answer)
- Quiz: Interactive CLI interface guides you through questions
- Grade: Provides feedback and explanations for answers
Please follow these few steps for an initial setup to use ansr.
-
ansr uses Google's gemini AI to process pdf and provided feedback on submissions. To setup env var (if you don't have an API key, you can sign up for free at their site: https://aistudio.google.com/welcome.
And get an API key from your Google AI Studio dashboard )If you do, then run:
setx ANSRCLI_GEMINI_API_KEY "<your key here>"- To install the
ansrpackage, run:
npm i -g ansrcli-
Open a new terminal (enables the newly set env var).
-
You're all set. Whenever you want to take a quiz based on some course material just run
ansr <file_path>and your quiz should start generating and launch right away.
Enjoy
To install:
$ npm install --global ansrcliTo run:
$ ansr <file_path>To run setup
$ npm run setup$ ansr --help
Usage
$ ansr
$ ansr <file_path>
This project was created during the HTTPSHacks 2025 hackathon — thanks to the organizers and participants for the opportunity and inspiration.
Thanks to the BCIT Computer Club, the mentors, and all the volunteers for their hardwork and support in making this event happen.