CLI reference
oaf [command] [options]
Three commands: convert, inspect, validate.
oaf --version # 0.1.0
oaf --help
oaf convert
Convert e-learning content between formats.
oaf convert <input> [output]
| Argument | |
|---|---|
<input> | Input file path. Only .story is implemented — see format support |
[output] | Output path. Defaults to the input name with the target extension |
General options
| Option | Values | Default |
|---|---|---|
-f, --format <format> | markdown, marp, marp-html, oaf, html-viewer | markdown |
-m, --mode <mode> | full, summary, outline | full |
html-viewer is accepted and then exits with HTML viewer output not yet implemented.
Content options
| Option | Effect | Default |
|---|---|---|
--include-notes / --no-notes | Speaker notes | included |
--include-quizzes / --no-quizzes | Quizzes | included |
--include-media / --no-media | Media references | included |
--no-frontmatter | Drop YAML frontmatter | frontmatter included |
--no-toc | Drop table of contents | TOC included |
--copy-media <dir> | Extract media files to <dir> | referenced, not extracted |
Formatting options
| Option | Values | Default |
|---|---|---|
--quiz-format <format> | checklist, table, details | checklist |
--notes-format <format> | blockquote, callout, section | blockquote |
Marp options
| Option | Values | Default |
|---|---|---|
--marp-theme <theme> | default, gaia, uncover | default |
--no-paginate | Disable page numbers | numbers shown |
--marp-header <text> | Header on every slide | none |
--marp-footer <text> | Footer on every slide | none |
Marp HTML options
| Option | Values | Default |
|---|---|---|
--marp-html-mode <mode> | presentation, slides | presentation |
Output
On success, a summary:
Summary:
Title: My Course
Scenes: 3
Slides: 24
Quizzes: 5
Media files: 18
Conversion warnings print before it, prefixed ⚠. Unsupported formats and
unimplemented paths exit non-zero.
oaf inspect
Inspect content structure.
oaf inspect <input>
| Option | Values | Default |
|---|---|---|
-f, --format <format> | tree, json, summary | tree |
--slides | Show slide detail | off |
--media | Show media files | off |
--quizzes | Show quizzes | off |
--format json writes the whole OAF package to stdout.
Only .story input is accepted; anything else exits non-zero.
oaf validate
Validate a package, converting first if needed.
oaf validate <input>
| Option | Default |
|---|---|
--strict | off |
Reports conversion warnings first, then schema validation results. Only
.story input is accepted.
Exit codes
| Code | Meaning |
|---|---|
0 | Success. Warnings may still have printed |
1 | Unsupported format, unimplemented path, validation failure, or read error |
Warnings do not affect the exit code. A conversion that dropped interactive
behavior still exits 0, so check the warning output rather than the exit
code alone.