Let LLM generate tests, validate test, and then you take them. Useful for certs.
Project description
examexam
A CLI for creating, validating, converting, and taking multiple‑choice practice exams. Keep everything local as TOML question banks, generate new questions with an LLM, sanity‑check them, and study 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.
Set up keys & environment
examexam reads a .env file (via python-dotenv) so you can keep secrets out of your shell history.
Create a .env next to where you run the commands:
# Use whichever providers you have
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=...
GEMINI_API_KEY=...
# Optional: default model name your setup understands
EXAMEXAM_DEFAULT_MODEL=gpt4
You’ll select a model with
--modelon commands that talk to an LLM (e.g.,gpt4,claude,gemini-1.5-pro).
Quick start
- Make a topics file (one topic per line):
VPC
S3
ECS
IAM
RDS
- Generate questions into a TOML bank (adds/extends the file):
examexam generate \
--exam-name "AWS Associate Practice" \
--toc-file topics.txt \
--output-file data/aws-practice.toml \
-n 10 \
--model gpt4
- Validate questions (model answers + Good/Bad triage):
examexam validate \
--question-file data/aws-practice.toml \
--exam-name "AWS Associate Practice" \
--model claude
- Take the exam in your terminal (resume supported):
examexam take --question-file data/aws-practice.toml
Optional: convert to pretty Markdown + HTML study notes:
examexam convert \
--input-file data/aws-practice.toml \
--output-base-name aws-practice
What each command does (at a glance)
- generate — creates new multiple‑choice questions for your topics and appends them to a TOML question bank.
- validate — asks a model to answer each question and flags questions as Good/Bad with a short rationale, then saves that info back into the same file.
- take — launches a clean, keyboard‑only test UI with shuffling, per‑option explanations, progress, time stats, and resume.
- convert — turns a question bank into Markdown and HTML for easy reading.
Where files go
- Question banks (TOML): store them wherever you like; many people use a
data/folder (e.g.,data/aws-practice.toml). - Session files: saved automatically to
.session/<test-name>.tomlso you can quit and resume later. - Converted outputs:
convertwrites<base>.mdand<base>.htmlalongside your working directory.
You don’t need to know the internal TOML schema—just point commands at your
.tomlfiles.
Command reference
examexam generate --exam-name <str> --toc-file <path> --output-file <path> [-n 5] [--model <name>]
examexam validate --question-file <path> --exam-name <str> [--model <name>]
examexam convert --input-file <path> --output-base-name <str>
examexam take --question-file <path>
# Global
--verbose Enable detailed logging
Tips & FAQ
- Keys not picked up? Ensure your
.envsits in the directory where you runexamexamand contains the correct provider key for the--modelyou chose. - Appending more questions: Re‑run
generatewith the same--output-file. - Stuck session? Delete
.session/<test-name>.tomlto start fresh. - Model naming: Use names your environment supports (e.g.,
gpt4,claude,gemini-1.5-pro).
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.4.tar.gz.
File metadata
- Download URL: examexam-0.1.4.tar.gz
- Upload date:
- Size: 11.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35672638e45682385af6157547fc6bc903cdb8d590d6a3c7d6e7e60b53c8745f
|
|
| MD5 |
7e69e8d527d6e2f8f00fef00d06ff4b3
|
|
| BLAKE2b-256 |
959c7be1a4c129d89a8d1afd5003d64a9c68dbf62cd3197404adbbcd3f093a7e
|
Provenance
The following attestation bundles were made for examexam-0.1.4.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.4.tar.gz -
Subject digest:
35672638e45682385af6157547fc6bc903cdb8d590d6a3c7d6e7e60b53c8745f - Sigstore transparency entry: 428460622
- Sigstore integration time:
-
Permalink:
matthewdeanmartin/examexam@209fe47749ad7528f3ba70e9f22a6a8771539cd7 -
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@209fe47749ad7528f3ba70e9f22a6a8771539cd7 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file examexam-0.1.4-py3-none-any.whl.
File metadata
- Download URL: examexam-0.1.4-py3-none-any.whl
- Upload date:
- Size: 37.0 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 |
6984dd2c7b06e5b039ca232f02a02f179bdcba2e45c87bc7c50f7636def969ff
|
|
| MD5 |
be034a718a361a715b73c7a86544f715
|
|
| BLAKE2b-256 |
aab0ceeefa542c4369962940739738eaff008ef130fc0b9ad2e81951e3a1a351
|
Provenance
The following attestation bundles were made for examexam-0.1.4-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.4-py3-none-any.whl -
Subject digest:
6984dd2c7b06e5b039ca232f02a02f179bdcba2e45c87bc7c50f7636def969ff - Sigstore transparency entry: 428460634
- Sigstore integration time:
-
Permalink:
matthewdeanmartin/examexam@209fe47749ad7528f3ba70e9f22a6a8771539cd7 -
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@209fe47749ad7528f3ba70e9f22a6a8771539cd7 -
Trigger Event:
workflow_dispatch
-
Statement type: