@moaw/cli
v1.6.0
Published
Command line tool to create, preview and export workshops using MOAW platform
Maintainers
Readme
@moaw/cli
Command line tool to create, preview and export workshops using MOAW platform.
Installation
npm install -g @moaw/cliUsage
Usage: moaw <command> [options]
Commands:
n, new <name> Create a new workshop
s, serve [<path>] Preview workshop in target path (default: .)
-p, --port Port to listen on (default: 4444)
-h, --host Host address to bind to (default: localhost)
-o, --open Open in browser (default: false)
c, convert <file> Convert asciidoc to markdown
-a, --attr <json_file> Attributes to use for conversion
-d, --dest <file> Destination file (default: workshop.md)
b, build [<file>] Build workshop and process file includes
-d, --dest <file> Destination file (default: <file>.build.md)
l, link [<file>] Get link to target file (default: workshop.md)
-r, --repo Set GitHub repo instead of fetching it from git
-b, --branch <name> Set branch name (default: current branch)
t, translate [<file>] Translate workshop to different languages
-l, --languages <lang1,lang2,...> Comma-separated list of target languages
-m, --model <model_name> Copilot model to use (default: gpt-5.2)
General options:
-v, --version Show version
--help Show this helpAsciidoc to Markdown conversion
AsciiDoc is a markup language that can offer more advanced features than Markdown. However, it is not supported directly by MOAW. This command allows you to convert an AsciiDoc file to Markdown file that can be used with MOAW.
moaw convert my-workshop.adoc -a attributes.jsonThe attributes.json file is a JSON file that contains the document attributes to use for the conversion.
As MOAW requires specific frontmatter metadata in the Markdown file, you can define this metadata in the attributes.json file using the meta key. For example:
{
"meta": {
"short_title": "My workshop",
"description": "My workshop description",
"tags": "tag1, tag2",
"level": "beginner",
"duration_minutes": 180,
...
}
}Note that not all AsciiDoc features are supported, and fall back to HTML generation will be used in that case. You can use the --verbose option to see if any unsupported feature is used.
AI-Generated translations
The translate command allows you to translate your workshop to different languages using GitHub Copilot CLI.
GitHub Copilot CLI must be installed and authenticated before you can use this command (see installation guide).
You can then use AI models from Copilot to translate your workshop. For example, to translate to Spanish and French:
moaw translate workshop.md -l es,fr[!NOTE] Translation may take some time depending on the size of your workshop and the number of target languages. There's a hard timeout of 30 minutes per translation request, so for very large workshops you may need to separate the translation task into multiple commands.
