Lathe: Using LLMs for Hands-On Technical Learning

Lathe enables active learning by using LLMs to generate tutorials for manual implementation

Lathe is an experimental system designed to use Large Language Models (LLMs) as teaching tools rather than replacement thinkers. Instead of having an AI write the final code, Lathe generates structured, multi-part technical tutorials that the user must work through by hand in a dedicated local UI. This approach aims to recreate the "ah-ha!" moments of traditional hands-on learning while leveraging the breadth of LLM knowledge for obscure or emerging domains where human-written resources are scarce.

Core Functionality and Workflow

Lathe combines LLM "skills" (specialized prompts/instructions) with a Golang-based CLI to manage the lifecycle of a technical tutorial.

Tutorial Generation and Management

Users generate tutorials by invoking specific skills within an interactive LLM session (such as Claude Code, Cursor, or Codex). For example, a prompt like /lathe build a 3D Slicer in Erlang triggers the generation of the first part of a tutorial.

The system supports several key operations:

  • /lathe: Generates the initial part of a tutorial (part-01.md).
  • /lathe-extend: Adds subsequent parts to a series.
  • /lathe-verify: Instructs the LLM to work through the tutorial in a temporary directory to ensure the code compiles and runs.
  • /lathe-ask: Allows the user to ask clarifying questions about a specific part of the tutorial.
  • /lathe-tag: Adds search tags for library organization.

The Local Learning Environment

Once generated, tutorials are stored locally in ~/.lathe/tutorials/ and served via a local web server (lathe serve) on port 4242. The UI is specifically designed for pedagogy, featuring:

  • Side-notes: Content is written with marginalia to prompt deeper thinking.
  • Exercises: "Left-to-the-reader" challenges at the end of each section to reinforce concepts.
  • Table of Contents: Hover-based navigation for easy movement through complex series.
  • Provenance Tracking: Every tutorial records the specific LLM model used, the "voice" applied, and a durable list of the URLs the LLM consulted during research.

Technical Architecture

Lathe separates the generative intelligence from the state management to ensure deterministic behavior.

  • LLM Skills: These run in the user's interactive agent session. They handle the research, prose generation, and verification logic. They call back into the CLI to store results.
  • Golang CLI: The CLI owns all durable state, manages the file system layout, and serves the web UI. It does not call LLMs directly, which avoids issues with headless API metering and keeps the user in control of the session.
  • Storage Layout: Tutorials are stored as directories containing a metadata.json file (tracking status, tools, and sources) and a series of Markdown files (part-01.md, etc.).

Addressing Hallucinations and Pedagogy

Because Lathe relies on LLMs, it is susceptible to hallucinations. The author argues that the risk is mitigated by the nature of the tool: because the user is required to type the code by hand, they are more likely to notice inconsistencies and ask questions, turning the act of correcting the LLM into a learning opportunity.

To further improve reliability, Lathe encourages the use of "thinking" models (e.g., Claude Opus) and provides an opt-in verification system. The /lathe-verify skill creates a fresh scratch directory and executes the tutorial's checkpoints to confirm the instructions are functional.

Customization through "Writing Voices"

Lathe allows users to define the persona of the tutorial to match their learning preference. Two default voices are provided:

  • plainspoken: Precise and honest, avoiding anthropomorphism or fabricated stories.
  • companion: A warmer, first-person "friend at the keyboard" persona.

Users can create custom voices using the /lathe-voice skill, which interviews the user about register and humor to draft a specification.

Community Insights and Perspectives

Discussion among users highlights both the potential and the pitfalls of LLM-driven education:

  • Active vs. Passive Learning: Users noted that the "typing by hand" requirement is critical. One user compared this to the "Zed Shaw method," noting that muscle memory and fluency often precede theoretical understanding.
  • Educational Validity: Some experienced educators expressed skepticism, noting that LLMs often struggle to create coherent, progressive curriculums and may provide a poorly chosen progression of information.
  • Hybrid Approaches: Suggestions were made to have the LLM search for existing human-made works first and supplement them, rather than generating from scratch.

"I think I may be actually internalizing concepts better by catching and pushing back on perceived slip-ups of the LLM."

Installation

Lathe is distributed as a single binary and can be installed via:

  • Homebrew (macOS): brew install devenjarvis/tap/lathe
  • Install Script: curl -sSf https://raw.githubusercontent.com/devenjarvis/lathe/main/install.sh | sh
  • Go: go install github.com/devenjarvis/lathe@latest (requires Go 1.25+)

Sources