What this page covers: how to configure learn.json for authors. Set editor mode and agent, control authentication and assessment, choose grading, define paths, and enable delivery. Includes examples for Gitpod and Codespaces. ✅
The learn.json
The learn.json file is where all teacher-side configuration lives. You can change the following properties:
Note: Properties marked as optional in your project may be inferred by LearnPack based on the exercises.
port: The port where the instructions will be hosted. Default:3000.authentication: Object with authentication options.mandatory: Iftrue, the user must log in before starting.
-
assessment: Object with assessment options.maxQuizRetries: Maximum quiz retries. Default:3.
-
editor: Object with editor options.mode:"extension"(VS Code plugin) or"preview"(local without VS Code).agent: Where instructions render:"vscode"or"os".version: UI version. Defaults to latest. Example"5.0"uses the latest5.0.x.
-
dirPath: Path to the configuration directory. Default:.learnat repo root. -
configPath: Path to the configuration file. Default:learn.json. -
outputPath: Path to the compiled output. Default:.learn/dist. -
publicPath: Public path where the result is hosted. Default:/preview. -
publicUrl: URL where the instructions will be hosted. Depends on the agent. -
grading: Grading mode for the tutorial. See Grading LearnPack Tutorials. -
exercisesPath: Path to the folder with the exercises. Often the repo root. -
disabledActions: Array of actions to disable (Build,Reset,Test,Tutorial). -
slug: The tutorial name. Auto-generated, but can be changed. -
title: The tutorial title. Use descriptive, SEO-friendly wording. -
preview: Image URL for the tutorial introduction. -
repository: Link to the tutorial repository. -
description: Multilingual description of the tutorial. Include topics, technologies, and learner outcomes. -
duration: Estimated time to finish the tutorial. -
difficulty: One ofeasy,beginner,intermediate,hard. -
projectType:"tutorial"or"project". Interactive packages are “tutorials”. -
autoPlay: Iftrue, LearnPack starts automatically in VS Code. -
video: Intro video URLs per language. -
bugs: URL to report bugs found in the tutorial. -
webpackTemplate: Custom webpack template for your tutorial.
Delivery configuration
Usedelivery to enforce a specific submission method:
Delivering a flag as project submission
Some projects use a CTF-style flag:Tip: If a student must collect more than one flag, increase quantity. The system ensures all are submitted.
Editor options at a glance
| Setting | Values | Where it opens | When to use |
|---|---|---|---|
| editor.mode | extension, preview | VS Code extension or local preview | Match your development flow. |
| editor.agent | vscode, os | VS Code or browser | Keep agent consistent with your environment. |
| editor.version | e.g. 5.0 | Latest 5.0.x UI | Pin a major.minor if needed. |
Heads-up: If LearnPack detects a different agent than the one suggested in learn.json, it shows a warning to preserve the best experience.
Compiler plugins
LearnPack supports python, javascript, html, css, dom, react via plugins:- @learnpack/html: HTML and CSS grading and compilation.
- @learnpack/node: JavaScript and Node.js tutorials.
- @learnpack/python: Python 3 with pyUnit integration.
- @learnpack/dom: Webpack build and Jest for DOM testing.
- @learnpack/react: React 18 via Webpack and Jest.
Good to know: LearnPack can auto-install the required plugin based on your exercises. 👀
Cloud provisioning
LearnPack does not install tech stacks for your tutorials. Use Gitpod or GitHub Codespaces to remove setup and minimize friction. Provisioning vendors can prepare the environment, then LearnPack starts immediately.Provisioning with Gitpod
Gitpod uses a root-level.gitpod.yml:
Define Docker image, language versions, and any tools your tutorial needs.
Provisioning with GitHub Codespaces
Codespaces provides a customizable cloud dev environment. Preconfigure dependencies and tools so learners can start fast. Example:.devcontainer/devcontainers.json

