Skip to main content

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

pipx keeps tools isolated and on your path. If you don’t use pipx, you can install with python -m pip install examexam or uv 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 --model on commands that talk to an LLM (e.g., gpt4, claude, gemini-1.5-pro).


Quick start

  1. Make a topics file (one topic per line):
VPC
S3
ECS
IAM
RDS
  1. 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
  1. Validate questions (model answers + Good/Bad triage):
examexam validate \
  --question-file data/aws-practice.toml \
  --exam-name "AWS Associate Practice" \
  --model claude
  1. 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>.toml so you can quit and resume later.
  • Converted outputs: convert writes <base>.md and <base>.html alongside your working directory.

You don’t need to know the internal TOML schema—just point commands at your .toml files.


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 .env sits in the directory where you run examexam and contains the correct provider key for the --model you chose.
  • Appending more questions: Re‑run generate with the same --output-file.
  • Stuck session? Delete .session/<test-name>.toml to 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

examexam-0.1.3.tar.gz (11.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

examexam-0.1.3-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file examexam-0.1.3.tar.gz.

File metadata

  • Download URL: examexam-0.1.3.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

Hashes for examexam-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7c33fa7f5794ac04b3fe8359779ebbfade4325e65dcbb61a2b430e9fc5827d19
MD5 17aa0bb5a8000c321cf1e0cce028f000
BLAKE2b-256 e3405679a295cfaf803d8bbdf9e74ddee4c03bb76f6b2b134cd58d37a77cf2c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for examexam-0.1.3.tar.gz:

Publisher: publish_to_pypi.yml on matthewdeanmartin/examexam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file examexam-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: examexam-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for examexam-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 00d7d09d1ec40b0fc5e979090fe30b33e3764e482f175cf22991400bd518e805
MD5 413d950d1d02f5aba2b17fad0fde7e32
BLAKE2b-256 c5235dce52bf2a92197a5be14378236f3494472a99d3a1e69f9286fa1b69dc55

See more details on using hashes here.

Provenance

The following attestation bundles were made for examexam-0.1.3-py3-none-any.whl:

Publisher: publish_to_pypi.yml on matthewdeanmartin/examexam

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page