Complete guide to using ReadMeLingo CLI to translate your GitHub documentation
npm install -g readmelingoogit clone https://github.com/KartikLabhshetwar/ReadMeLingo.git
cd ReadMeLingo
npm install
npm run cli:buildNote: Requires Node.js 18 or higher. Check your version with node --version
api_... or lingo_...)export LINGODOTDEV_API_KEY=your_api_key_here# Create .env file in your project root
LINGODOTDEV_API_KEY=your_api_key_here
GITHUB_TOKEN=your_github_token_here # Optional, for private repos# Add to ~/.zshrc or ~/.bashrc
echo 'export LINGODOTDEV_API_KEY=your_api_key_here' >> ~/.zshrc
source ~/.zshrcrepo scopeexport GITHUB_TOKEN=ghp_your_token_hereRun ReadMeLingo without any arguments to enter interactive mode. The CLI will guide you through the translation process with prompts.
readmelingooThis will start an interactive session where you can:
Use the translate command to translate repository documentation with options.
readmelingoo translate [options]| Option | Description |
|---|---|
| -r, --repo <repo> | GitHub repository URL or owner/repo format |
| -t, --token <token> | GitHub personal access token (for private repos) |
| -l, --languages <languages> | Comma-separated list of target language codes (e.g., es,fr,de) |
| -o, --output <dir> | Output directory for translated files (default: ./translations) |
| --include-contributing | Include CONTRIBUTING.md file in translation |
| --include-docs | Include /docs folder in translation |
You can specify repositories in two formats:
owner/repo - e.g., facebook/reacthttps://github.com/owner/repo - Full GitHub URLCheck the installed version of ReadMeLingo.
readmelingoo --versionor
readmelingoo -VDisplay help information for commands.
readmelingoo --helpor
readmelingoo -h# Start interactive mode
readmelingoo
# The CLI will prompt you for:
# - Repository URL
# - Files to include
# - Target languages
# - Output directory
# - GitHub token (if needed)readmelingoo translate \
--repo facebook/react \
--languages es,fr,de,ja,ko \
--output ./translationsreadmelingoo translate \
--repo owner/repo \
--languages es,fr \
--include-contributing \
--output ./docs/translationsreadmelingoo translate \
--repo owner/repo \
--languages es,fr,de,it,pt \
--include-docs \
--output ./i18nreadmelingoo translate \
--repo owner/private-repo \
--token ghp_your_token_here \
--languages es,fr \
--output ./translations# Set environment variables
export LINGODOTDEV_API_KEY=your_api_key
export GITHUB_TOKEN=ghp_your_token
# Run translation
readmelingoo translate \
--repo owner/repo \
--languages es,fr,dereadmelingoo translate \
--repo https://github.com/owner/repo \
--languages es,fr,de,ja \
--include-contributing \
--include-docs \
--output ./translationsReadMeLingo supports 40+ languages. Use the language codes below with the --languages option.
Translated files are saved with the following naming convention:
translations/
├── README.es.md # Spanish translation
├── README.fr.md # French translation
├── README.de.md # German translation
├── CONTRIBUTING.es.md
├── CONTRIBUTING.fr.md
└── docs/
├── getting-started.es.md
├── getting-started.fr.md
└── ...Store your API keys in environment variables or .env files. Never commit them to version control.
Translate to multiple languages in a single command for faster processing and better API efficiency.
Always review translated content, especially technical terms and code examples that may need manual adjustment.