LearnOS docs
CLI

ask

One-shot answer grounded in your course content, with citations.

ask is the one CLI command that calls a model. It retrieves the most relevant sections from your library, builds the tutor context, sends a single completion, and prints the answer plus the sources it drew from. The same retrieval + prompt the chat UI uses, but headless and one-shot.

ask

Search your library, build context, one completion, answer + sources. Does not stream, persist a chat, or run tool calls.

Parameters
NameTypeDefaultDescription
<question>*stringThe question (positional).
--coursestringCourse id or title substring to scope retrieval. Omit for the whole library.
--limitinteger8Sections to retrieve for context.
--modelstringgoogle/gemini-3.1-flash-liteModel id (any supported tutor model).
--formattext | jsontexttext prints answer + sources; json returns { question, model, answer, sources, hits }.
Returns
In text mode: the answer, then a numbered Sources list (lesson title · heading).
learnos ask "How does event delegation work?" --course "Web Development"
learnos ask "Summarize closures" --format json

Command Palette

Search for a command to run...