YouTube
Capture a YouTube video as a lesson, then author it from the transcript.
Turn a YouTube video into a LearnOS lesson. Capture is a two-step flow:
- Capture (
youtube add) — fetch the video's timestamped transcript (captions), store the raw segments, and write a transcript-derived scaffold as the lesson body. This creates avideolesson, indexed for search immediately. - Author — read the transcript (
transcript), synthesize a polished, research-enriched lesson, and write it back withlesson set-content.
youtube add fetches from youtube.com, so your machine must be able to
reach YouTube. Captions-only in v1 — videos without captions are reported
clearly; speaker diarization is future work. Once a lesson exists, all the
usual lesson tools (notes, highlights, flashcards, chat, reviews) work on it
unchanged.
Capture
youtube addCapture a YouTube video as a video lesson: fetch its timestamped transcript, store the raw segments, and write a transcript scaffold.
| Name | Type | Default | Description |
|---|---|---|---|
| <url>* | string | — | YouTube URL or 11-char video id (positional). |
| --course | string | — | Append to this course id. Omit to create a new 1-video course. |
| --title | string | — | Course title when creating (defaults to the video title). |
| --group-seconds | number | 90 | Transcript scaffold section length, in seconds. |
| --force | boolean | false | Re-fetch and replace an existing lesson's raw transcript. Leaves content_md (scaffold/authored lesson) untouched. |
| --format | json | text | json | Output format. |
Re-capturing the same video is idempotent — it returns the existing lesson
rather than duplicating it (scoped to the target course when --course is set,
so the same video can intentionally live in two courses). Pass --force to
re-pull updated captions: it replaces the raw transcript segments only and
leaves content_md (your scaffold or authored lesson) untouched.
Read the transcript
transcriptPrint a video lesson's raw timestamped transcript — the source for authoring.
| Name | Type | Default | Description |
|---|---|---|---|
| <lesson_id>* | string | — | The video lesson's UUID (positional). |
| --format | json | text | json | Output format. Text mode is `[h:mm:ss] text` per line. |
Author the lesson
lesson set-contentOverwrite a lesson's markdown body (the authoring write-back) and re-index it.
| Name | Type | Default | Description |
|---|---|---|---|
| <lesson_id>* | string | — | The lesson UUID to overwrite (positional). |
| --file | string | — | Path to a markdown file. If omitted, read from stdin. |
| --format | json | text | json | Output format. |
To make a section seek the video player, place an HTML comment
<!--t:SECONDS--> right after a heading. The chunker lifts it into the chunk's
start_seconds (and strips it from the rendered/searched body):
## Why attention scales
<!--t:412-->
The key idea introduced around the 7-minute mark is…End to end
# 1. Capture (your machine needs YouTube access). Creates a 1-video course.
learnos youtube add "https://youtu.be/VIDEO_ID" --format text
# → captured lesson <LID> (course <CID>) — N segments
# 2. Read the transcript while authoring (or use the MCP get_transcript tool).
learnos transcript <LID> --format text > transcript.txt
# 3. Write the synthesized, research-enriched lesson back.
learnos lesson set-content <LID> --file ./authored-lesson.mdThe authoring step (2–3) is where supplemental research and resources come in —
do it by hand, or let an agent drive the MCP get_transcript →
update_lesson_content tools alongside a research workflow.