Documentation

Complete guide to using ReadMeLingo CLI to translate your GitHub documentation

Installation

Option 1: Install from npm (Recommended)

bash
npm install -g readmelingoo

Option 2: Install from Source

bash
git clone https://github.com/KartikLabhshetwar/ReadMeLingo.git
cd ReadMeLingo
npm install
npm run cli:build

Note: Requires Node.js 18 or higher. Check your version with node --version

Setup

1. Get Your Lingo.dev API Key

  1. Visit https://lingo.dev/auth
  2. Sign up or log in to your account
  3. Navigate to Projects → Your Project → API Key
  4. Copy your API key (format: api_... or lingo_...)

2. Set Your API Key

Option A: Environment Variable (One-time use)

bash
export LINGODOTDEV_API_KEY=your_api_key_here

Option B: .env File (Recommended for development)

bash
# Create .env file in your project root
LINGODOTDEV_API_KEY=your_api_key_here
GITHUB_TOKEN=your_github_token_here  # Optional, for private repos

Option C: Persistent Setup (Recommended for regular use)

bash
# Add to ~/.zshrc or ~/.bashrc
echo 'export LINGODOTDEV_API_KEY=your_api_key_here' >> ~/.zshrc
source ~/.zshrc

3. (Optional) GitHub Token for Private Repositories

  1. Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Generate a new token with repo scope
  3. Set it as an environment variable:
bash
export GITHUB_TOKEN=ghp_your_token_here

Commands

Interactive Mode

Run ReadMeLingo without any arguments to enter interactive mode. The CLI will guide you through the translation process with prompts.

bash
readmelingoo

This will start an interactive session where you can:

  • Select the repository to translate
  • Choose which files to include (README.md, CONTRIBUTING.md, /docs folder)
  • Select target languages from a list
  • Specify output directory
  • Provide GitHub token if needed

Translate Command

Use the translate command to translate repository documentation with options.

Basic Syntax

bash
readmelingoo translate [options]

Options

OptionDescription
-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-contributingInclude CONTRIBUTING.md file in translation
--include-docsInclude /docs folder in translation

Repository Format

You can specify repositories in two formats:

  • owner/repo - e.g., facebook/react
  • https://github.com/owner/repo - Full GitHub URL

Version Command

Check the installed version of ReadMeLingo.

bash
readmelingoo --version

or

bash
readmelingoo -V

Help Command

Display help information for commands.

bash
readmelingoo --help

or

bash
readmelingoo -h

Examples

Example 1: Basic Translation (Interactive Mode)

bash
# Start interactive mode
readmelingoo

# The CLI will prompt you for:
# - Repository URL
# - Files to include
# - Target languages
# - Output directory
# - GitHub token (if needed)

Example 2: Translate README to Multiple Languages

bash
readmelingoo translate \
  --repo facebook/react \
  --languages es,fr,de,ja,ko \
  --output ./translations

Example 3: Include CONTRIBUTING.md

bash
readmelingoo translate \
  --repo owner/repo \
  --languages es,fr \
  --include-contributing \
  --output ./docs/translations

Example 4: Translate Entire /docs Folder

bash
readmelingoo translate \
  --repo owner/repo \
  --languages es,fr,de,it,pt \
  --include-docs \
  --output ./i18n

Example 5: Private Repository with Token

bash
readmelingoo translate \
  --repo owner/private-repo \
  --token ghp_your_token_here \
  --languages es,fr \
  --output ./translations

Example 6: Using Environment Variables

bash
# 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,de

Example 7: Full URL Format

bash
readmelingoo translate \
  --repo https://github.com/owner/repo \
  --languages es,fr,de,ja \
  --include-contributing \
  --include-docs \
  --output ./translations

Supported Languages

ReadMeLingo supports 40+ languages. Use the language codes below with the --languages option.

🇪🇸
Spanish
es
🇫🇷
French
fr
🇩🇪
German
de
🇮🇹
Italian
it
🇵🇹
Portuguese
pt
🇯🇵
Japanese
ja
🇰🇷
Korean
ko
🇨🇳
Chinese
zh
🇷🇺
Russian
ru
🇸🇦
Arabic
ar
🇮🇳
Hindi
hi
🇳🇱
Dutch
nl
🇵🇱
Polish
pl
🇹🇷
Turkish
tr
🇸🇪
Swedish
sv
🇳🇴
Norwegian
no
🇩🇰
Danish
da
🇫🇮
Finnish
fi
🇬🇷
Greek
el
🇨🇿
Czech
cs
🇷🇴
Romanian
ro
🇭🇺
Hungarian
hu
🇻🇳
Vietnamese
vi
🇹🇭
Thai
th
🇮🇩
Indonesian
id
🇮🇱
Hebrew
he
🇺🇦
Ukrainian
uk
🇪🇸
Catalan
ca
🇧🇬
Bulgarian
bg
🇭🇷
Croatian
hr
🇸🇰
Slovak
sk
🇸🇮
Slovenian
sl
🇱🇹
Lithuanian
lt
🇱🇻
Latvian
lv
🇪🇪
Estonian
et
🇲🇾
Malay
ms
🇵🇭
Filipino
tl

Output Structure

Translated files are saved with the following naming convention:

bash
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
    └── ...

Best Practices

1

Use Environment Variables

Store your API keys in environment variables or .env files. Never commit them to version control.

2

Batch Translations

Translate to multiple languages in a single command for faster processing and better API efficiency.

3

Review Translations

Always review translated content, especially technical terms and code examples that may need manual adjustment.

ReadMeLingo
Translate GitHub docs to 40+ languages
Powered by
Lingo.dev
Translation powered by Lingo.dev SDK