Authentication
Authenticate with Lingo.dev to access the cloud-based translation engine.
INFO
Want to use your own AI provider?
Skip Lingo.dev authentication entirely with the Bring Your Own LLM feature. Connect your OpenAI or Anthropic API keys directly by configuring your provider in i18n.json
and setting the appropriate environment variables.
Check Your Authentication Status
Verify if you're already logged in:
npx lingo.dev@latest auth
This displays your authentication status and email address if you're currently logged in.
Authentication Methods
Choose between two simple authentication options:
1. Browser Login (Recommended for Local Development)
npx lingo.dev@latest auth --login
This opens your browser for a quick login and automatically redirects you back to your terminal.
INFO
If browser redirects fail due to ad blockers or security settings, use the environment variable method instead.
2. API Key (Best for CI/CD and Headless Environments)
Set your API key as an environment variable:
export LINGODOTDEV_API_KEY=your_api_key_here
Or add it to a .env
file in your project root:
LINGODOTDEV_API_KEY=your_api_key_here
WARNING
Always add .env
to your .gitignore
to prevent exposing your API key.
Logging Out
Remove your local authentication:
npx lingo.dev@latest auth --logout
This clears your stored token, requiring re-authentication for future commands.
Note: When using environment variables, simply unset the variable to "log out."
Why We Offer Two Methods
Our dual authentication approach gives you flexibility:
- Browser login provides a seamless experience without managing API keys
- Environment variables enable automation in CI/CD pipelines and headless environments
Choose the method that best fits your workflow and security requirements.
External Provider Authentication
When using your own AI provider, set up provider-specific authentication:
OpenAI
export OPENAI_API_KEY=your_openai_api_key
Anthropic
export ANTHROPIC_API_KEY=your_anthropic_api_key
Use these alongside or instead of Lingo.dev authentication, depending on your configuration.
Security Best Practices
- Never commit API keys to version control
- Add
.env
files to your.gitignore
- Rotate API keys regularly
- Use environment variables in CI/CD pipelines
Following these authentication methods and security practices ensures a secure integration with Lingo.dev, whether you're working locally or in automated environments.