-
Notifications
You must be signed in to change notification settings - Fork 99
feat(cli): translate #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cli): translate #181
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds a new AI-powered translation feature to the MOAW CLI, enabling users to translate workshop files into multiple languages using GitHub Copilot CLI. The implementation integrates the Copilot SDK to provide agentic translation capabilities with configurable model selection.
Changes:
- Added new
translatecommand with support for multi-language translation via GitHub Copilot CLI - Integrated
@github/copilot-sdkdependency (v0.1.16) to enable AI-powered translations - Updated documentation and help text to describe the new translation functionality
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/src/commands/translate.ts | New command implementation for AI-powered translation with authentication, session management, and file handling |
| packages/cli/src/cli.ts | Added translate command routing, new CLI options (--languages, --model), and updated help text |
| packages/cli/src/commands/index.ts | Exported the new translate command module |
| packages/cli/README.md | Documented translate command usage, options, and requirements |
| packages/cli/package.json | Added @github/copilot-sdk as a dependency |
| packages/cli/tsconfig.json | Added skipLibCheck to support Copilot SDK integration |
| packages/cli/src/commands/build.ts | Removed unused readJson import |
| package-lock.json | Updated lock file with Copilot SDK dependencies and peer dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| file?: string; | ||
| languages?: string; | ||
| model?: string; | ||
| verbose?: boolean; |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 'verbose' option is accepted in the TranslateOptions type and passed from the CLI, but it is never used in the translate function implementation. Either implement verbose logging (similar to other commands in the codebase) or remove this unused parameter.
| You are an expert translator for technical documents. Your task is to translate the provided workshop content into the specified target language while preserving the original formatting, code snippets, and technical terminology. Ensure that the translated content is complete, clear, accurate, and maintains the instructional tone of the original text. | ||
| ## Task | ||
| 1. Translate the workshop file \`${file}\` in languages: \`${languages}\`. |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error: 'Translate the workshop file in languages' should be 'Translate the workshop file to languages' or 'Translate the workshop file into languages'.
| 1. Translate the workshop file \`${file}\` in languages: \`${languages}\`. | |
| 1. Translate the workshop file \`${file}\` into languages: \`${languages}\`. |
|
🎉 This PR is included in version 1.6.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
This pull request introduces a new AI-powered translation feature to the CLI, allowing users to translate workshop files into multiple languages using GitHub Copilot CLI. The update adds a new
translatecommand, updates documentation and CLI help text, and integrates the Copilot SDK as a dependency. Below are the most important changes grouped by theme:New Translation Feature:
translatecommand (translate.ts) that uses GitHub Copilot CLI to translate workshop files into specified languages, handling authentication, session management, and outputting translated files.translatecommand in the CLI entrypoint (cli.ts), updated command parsing to support new options (--languages,--model), and routed the command appropriately. [1] [2] [3] [4] [5] [6]Documentation Updates:
README.mdto document the newtranslatecommand, its options, usage instructions, and Copilot CLI requirements. [1] [2]Dependency and Configuration Changes:
@github/copilot-sdkas a new dependency inpackage.jsonto support Copilot integration.tsconfig.jsonto skip type checking of library files for smoother Copilot SDK integration.These changes collectively enable users to easily translate technical workshop files into multiple languages using AI, with clear documentation and robust CLI support.