examexam
A CLI for creating, validating, studying for, and taking multiple-choice practice exams. Keep everything local as TOML question banks, generate new questions with an LLM, sanity-check them, generate study guides, and test your knowledge in a rich terminal UI.
Install
Recommended: pipx
pipx install examexam
pipxkeeps tools isolated and on your path. If you don’t use pipx, you can install withpython -m pip install examexamoruv tool install examexam.
Quick Start: AWS Practice Exam Workflow
Here’s a typical workflow for creating and studying for an AWS exam.
-
Initialize a new project
This creates a default
examexam.tomlconfiguration file in your current directory.examexam init -
Create a topics file
Make a simple text file with one topic per line. Let's call it
aws_topics.txt:AWS VPC AWS S3 AWS IAM AWS Security Groups vs NACLs
-
Generate a study plan
Get a head start by generating a Markdown study guide for all your topics.
examexam study-plan --toc-file aws_topics.txt
This creates a
study_guide/aws_topics_study_plan.mdfile. -
Generate questions
Create 5 questions for each topic and save them to a TOML file. We'll use a fast, cheap model for this.
examexam generate \ --toc-file aws_topics.txt \ --output-file aws_exam.toml \ -n 5 \ --model-provider openai \ --model-class fast
-
Validate the questions
Have a different LLM answer each question and flag potentially "bad" or unfair questions. The results are saved back into
aws_exam.toml.examexam validate \ --question-file aws_exam.toml \ --model-provider anthropic
-
Drill down on a tough topic
Generate a detailed research guide for a specific topic you want to focus on.
examexam research --topic "AWS Security Groups vs NACLs"
This creates a
study_guide/aws_security_groups_vs_nacls.mdfile. -
Take the exam
Launch the interactive terminal UI to take your test. Progress is saved automatically.
examexam take --question-file aws_exam.toml
-
(Optional) Customize the prompts
If you want to change how questions or study guides are generated, you can deploy the default Jinja2 templates to your local directory for editing.
examexam customizeThis creates a
prompts/folder.examexamwill automatically use these local templates instead of the built-in ones.
Configuration
examexam is configured via a TOML file and environment variables.
examexam.toml
Run examexam init to create a default examexam.toml file. This file allows you to set default values for command-line arguments and general behavior, such as your preferred models.
Environment Variables
Any setting in the TOML file can be overridden by an environment variable. The format is EXAMEXAM_SECTION_KEY. For example, to override the default number of questions:
export EXAMEXAM_GENERAL_DEFAULT_N=10
examexam generate --toc-file ...
Precedence Order
- Command-line arguments (e.g.,
--model ...) - Environment variables (e.g.,
EXAMEXAM_GENERATE_MODEL=...) - Values in
examexam.toml - Hardcoded application defaults
Model Selection
You can control which LLM is used with three flags, in order of priority:
--model: Specifies an exact model ID (e.g.,gpt-4.1-mini). This overrides all other settings.--model-provider: Chooses a provider likeopenai,anthropic,google, etc.--model-class: Use eitherfast(default, for cheaper, quicker models) orfrontier(for more powerful, expensive models). Used in combination with--model-provider.
Examples:
--model-provider google --model-class frontier-> Uses Google's best model.--model-provider openai-> Uses OpenAI's default "fast" model.--model gpt-5-> Uses exactlygpt-5, ignoring provider and class flags.
Command Reference
# General
examexam --help
examexam --version
examexam --verbose # Enable detailed logging for any command
# Setup and Customization
examexam init
examexam customize [--target-dir <path>] [--force]
# Core Workflow
examexam generate --toc-file <path> [-n 5] [--output-file <path>] [--model-provider ...]
examexam validate --question-file <path> [--model-provider ...]
examexam take [--question-file <path>]
examexam convert --input-file <path> --output-base-name <str>
# Study Tools
examexam research --topic <str> [--model-provider ...]
examexam study-plan --toc-file <path> [--model-provider ...]
Command Details
init: Creates a defaultexamexam.tomlconfiguration file in the current directory.generate: Creates new multiple-choice questions for topics in a--toc-fileand appends them to a TOML question bank.validate: Asks an LLM to answer each question and flags questions as "Good" or "Bad" with a rationale, saving results back to the file.take: Launches a clean, keyboard-only test UI. Supports automatic session saving and resuming. Can also be run in a non-interactive "machine mode" for testing (--machine --strategy <name>).convert: Turns a TOML question bank into pretty Markdown and HTML files for studying.research: Generates a detailed, single-topic study guide with concepts, examples, and suggested search queries.study-plan: Generates a consolidated Markdown study guide covering all topics from a--toc-file.customize: Deploys the built-in Jinja2 prompt templates to a localprompts/directory so you can edit them.
File Locations
- Configuration:
examexam.tomlin your project's root directory. - Question Banks (TOML): You decide where to store them. We recommend a
data/folder (e.g.,data/aws_exam.toml). - Topic Files (TXT): Plain text files with one topic per line.
- Session Files: Saved automatically to
.session/<test-name>.tomlto allow resuming tests. - Study Guides: Saved to
study_guide/in your project directory. - Custom Prompts: If you run
customize, templates are deployed toprompts/.
Credits
- Author: Matthew Dean Martin (matthewdeanmartin)
- Thanks to OpenAI and Google Gemini models used during generation/validation.
License
MIT License
Metadata
Release files for examexam 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| examexam-0.1.8.tar.gz | 51.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| examexam-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.2 kB
Release files / examexam-0.1.8.tar.gz
| Download URL | examexam-0.1.8.tar.gz |
|---|---|
| Size | 51.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
096251ec3ff987b52694e5bad976dbfb7420c7a80c8657531931a315a21a2a6c
|
|
BLAKE2b-256 checksum How to use checksums |
fa768ed01e63cdb23c85971c0cef62a56e3f30d027b705adc5b705ec69b4e11c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2025.
Transparency logRelease files / examexam-0.1.8-py3-none-any.whl
| Download URL | examexam-0.1.8-py3-none-any.whl |
|---|---|
| Size | 62.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
867d4a5e6dce4674f700918ec4f79d5b97db513b2c01d5517db7caf9b2302e2d
|
|
BLAKE2b-256 checksum How to use checksums |
55d79c27bcd74c47719d06b6d1fa1139c9020d82f2da5139e2c74cb7639a4d70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2025.
Transparency log