A CLI for translating locale files and Discord application command manifests with OpenAI.
- Features
- Requirements
- Setup
- Usage
- Development
- Testing
- Troubleshooting
- Security
- Configuration
- Operations
- Commands
- Exit codes
- Support
- Links
- License
Translate Discord locale JSON files or application command manifests with OpenAI.
Use Node.js 26 or later. Create an OpenAI API key before a write run.
Install @eliware/translate globally with npm install --global @eliware/translate or locally with npm install @eliware/translate. Set OPENAI_API_KEY in an .env file in the installed package root.
Run the CLI from the target repository root. Read the user guide for setup, modes, options, and file changes. Read release notes for package changes.
Read the documentation index and specifications index before you change repository files.
Run npm test for aggregate validation.
Use --debug to show error details. Check the input JSON and the installed package .env file when a write run fails.
The CLI sends source JSON and prompt text to OpenAI. Send only data that you can share with OpenAI. Keep API keys out of source control.
Write runs require OPENAI_API_KEY and an .env file in the installed package root. A preview does not read .env or require the API key. Locale mode reads prompt.json. Command mode reads prompt-commands.json.
Run translate --dry-run before a write run. Add --yes to send requests and write files. Locale mode writes translated locale files and leaves en-US.json unchanged. Command mode overwrites valid command manifests, or only the manifest selected with --file. The CLI does not write files when you add --dry-run.
Run translate --help to show usage. Run translate --version to show the installed package version. Run translate without arguments to show help. The CLI has no subcommands or pass-through arguments. No delimiter is required.
| Code | Meaning |
|---|---|
0 |
The command completed successfully. |
1 |
Setup, input, translation, or file processing failed. |
For help, questions, or to chat with the author and community, visit:


