Skip to content

Repository files navigation

blendtutor

A single-binary CLI for building interactive coding lessons — in R or Python — with AI-powered feedback. Instructors author exercises and grading prompts; learners practice in the terminal or in a browser site with instant, personalized feedback.

Install

macOS and Linux, one command (verifies the tarball's SHA256 checksum; installs to ~/.local/bin, override with BLENDTUTOR_INSTALL_DIR):

curl -LsSf https://raw.githubusercontent.com/mcmullarkey/blendtutor/main/scripts/install.sh | sh

Prebuilt binaries for Linux and macOS (x86_64 + aarch64) are on the releases page; verify against sha256sums.txt in the same release. To build from source instead:

cargo install --path crates/cli

API key

run and eval call an LLM provider; authoring commands need no key:

export FIREWORKS_API_KEY=fw_...   # or ANTHROPIC_API_KEY (CLI only; browser BYOK is Fireworks-only)

The whole game

The instructor loop is init → new → validate → run → eval → eval-report → build — walked end to end in The whole game:

blendtutor init my-course                         # scaffold course + starter lesson + eval suite
blendtutor new lesson --lang r greet              # add lessons/greet.yaml + eval_<name>.yaml sibling
blendtutor validate lessons/greet.yaml            # check a lesson (nonzero exit drops into CI)
blendtutor run lessons/greet.yaml --code sub.R    # execute the submission, get an LLM verdict
blendtutor eval lessons/greet.yaml                # score grading-prompt accuracy on the eval cases
blendtutor eval lessons/greet.yaml --write-report # persist eval-report.json at the course root for build
blendtutor eval-report lessons/greet.yaml         # LLM-judged report → docs/evals/<lesson>/
blendtutor build my-course --target webr -o site  # static browser site (--target webr|pyodide)

Deploy to GitHub Pages

The built site/ is fully static — deploy to GitHub Pages as-is. webR needs cross-origin isolation (COOP/COEP headers Pages cannot set), so the build ships a vendored coi-serviceworker shim that re-serves the page with the required headers (Pyodide-only sites don't need it). Two example courses are deployed alongside the docs:

Author a course with Claude Code

This repo ships a Claude Code skill, blendtutor-course. In a clone, run /blendtutor-course <chapter file or URL> (or ask Claude to build a course): it scaffolds lessons with checks and solutions, writes a minimal eval suite, verifies the checks locally, and exports a Quarto snippet or builds a site.

Quarto extension

Interactive exercises in .qmd documents (Quarto >= 1.4, extension version 0.2.0). Run this from the folder that contains _quarto.yml:

quarto add mcmullarkey/blendtutor

The whole game covers the rest:

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages