Let LLM generate tests, validate test, and then you take them. Useful for certs.
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file examexam-0.1.7.tar.gz.
File metadata
- Download URL: examexam-0.1.7.tar.gz
- Upload date:
- Size: 46.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eabffde3ba91891204f7f79632d3203756dc02da76ccdf1b3f28fc24618fb85
|
|
| MD5 |
463a3432ab8385519d44510eeb4ca0b1
|
|
| BLAKE2b-256 |
664269a30256eb7c732f6e18abf2ba115271b2ba50334367fe3de40a0d377ee6
|
Provenance
The following attestation bundles were made for examexam-0.1.7.tar.gz:
Publisher:
publish_to_pypi.yml on matthewdeanmartin/examexam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
examexam-0.1.7.tar.gz -
Subject digest:
3eabffde3ba91891204f7f79632d3203756dc02da76ccdf1b3f28fc24618fb85 - Sigstore transparency entry: 480554899
- Sigstore integration time:
-
Permalink:
matthewdeanmartin/examexam@227fcc8a8b505c3f72bf0991f6b2760ec3a0fb6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/matthewdeanmartin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@227fcc8a8b505c3f72bf0991f6b2760ec3a0fb6f -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file examexam-0.1.7-py3-none-any.whl.
File metadata
- Download URL: examexam-0.1.7-py3-none-any.whl
- Upload date:
- Size: 56.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3813ef3afed672870ac7f7f80456b305d60349a1159341ee067ad06e411592a
|
|
| MD5 |
77f72838c9def8ebb5cd57cd87465f36
|
|
| BLAKE2b-256 |
4f86201a95ea5d3aba695a3024034be0cc2b6394f4c14becb7017a3669b6c088
|
Provenance
The following attestation bundles were made for examexam-0.1.7-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on matthewdeanmartin/examexam
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
examexam-0.1.7-py3-none-any.whl -
Subject digest:
c3813ef3afed672870ac7f7f80456b305d60349a1159341ee067ad06e411592a - Sigstore transparency entry: 480554902
- Sigstore integration time:
-
Permalink:
matthewdeanmartin/examexam@227fcc8a8b505c3f72bf0991f6b2760ec3a0fb6f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/matthewdeanmartin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@227fcc8a8b505c3f72bf0991f6b2760ec3a0fb6f -
Trigger Event:
workflow_dispatch
-
Statement type: