Thank you for contributing to Lingo.dev! We're an exciting open source project and we love having you contribute!
Here are some resources and guidance to help you get started:
Here's how to get the project running locally:
- Node.js: Make sure you have Node.js version 18 or higher installed.
- pnpm: You can install using this command
npm install -g pnpmor by following this guide - AI API Key:
Currently, Groq, Google, and Mistral are supported.
- GROQ API Key: You can get one by signing up at Groq
- GOOGLE API Key: You can get one in the Google AI Studio
- MISTRAL API Key: You can get one by signing up at Mistral AI
To set up the project, clone the repository and install the dependencies:
git clone https://github.com/lingodotdev/lingo.dev
cd lingo.dev
pnpm installNext, configure an AI API key. You can use either a Lingo.dev API key or one of the supported LLM model providers.
Please refer to our docs on how to set this up: https://lingo.dev/en/cli/quick-start#step-2-authentication
Note: When loading LLM API keys (both Lingo.dev and other LLM model providers like Groq or Mistral), the Lingo.dev Compiler checks the following sources in order of priority:
- Environment variables (via
process.env) - Environment files (
.env,.env.local,.env.development) - Lingo.dev configuration
Next, you can run the project using the following commands:
# start the build process
pnpm turbo build
# in terminal window 1 - watch for CLI code changes
cd packages/cli
pnpm run dev
# in terminal window 2 - test the CLI
cd packages/cli
pnpm lingo.dev --help # this command will use the current CLI code + demo config from ./packages/cli/i18n.jsonFeel free to ask questions on our Discord server!
Want to add support for a new LLM provider to Lingo.dev? Here's a checklist to help you get started:
-
Add Your Dependency
-
Update the Config Schema
- Edit
packages/spec/src/config.tsand update the list of allowed provideridvalues to include your new provider.
- Edit
-
Provider Details
- Add your provider to
packages/compiler/src/lib/lcp/api/provider-details.tswith name, env var, config key, API docs, and signup link.
- Add your provider to
-
API Key Handling
- Update
packages/compiler/src/utils/llm-api-key.tsto add functions for getting the API key from environment/config.
- Update
-
CLI and Compiler Logic
- Update the CLI (e.g.,
packages/cli/src/cli/localizer/explicit.ts,packages/cli/src/cli/processor/index.ts) to support your provider. - Update the compiler's translation logic to instantiate your provider's client (see
packages/compiler/src/lib/lcp/api/index.ts).
- Update the CLI (e.g.,
-
Error Handling
- Ensure user-facing error messages are updated to mention your provider where relevant (API key checks, troubleshooting, etc).
-
Test and Document
- Add or update tests to cover your provider.
- Update documentation and this contributing guide as needed.
Tip: Look at how existing providers like "groq", "google", and "mistral" are implemented for reference. Consistency helps us maintain quality and predictability!
If you find a bug, please create an Issue and we'll triage it.
- Please search existing Issues before creating a new one
- Please include a clear description of the problem along with steps to reproduce it. Exact steps with screenshots and URLs really help here
- Before starting work on an issue, please comment on it and wait for it to be assigned to you. This prevents multiple people from working on the same issue simultaneously
- Let's discuss implementation details in the issue comments or Discord before starting work, to ensure alignment between contributors and the Lingo.dev team
We love your Pull Requests! However, we maintain extremely high standards for code quality and design. We are looking for elegant, 12/10, beautiful code and deeply weighted system design decisions.
- Surgical PRs: Pull requests must be surgical and extremely single-purposed. One clear objective per PR.
- Elegant Code: We expect beautifully crafted, elegant code that demonstrates mastery of the language and patterns.
- Deep Design Thinking: System design decisions must be deeply considered and well-reasoned.
- Comprehensive Testing: Must include tests that surgically test both positive and negative paths of the code.
- Uncompromising Quality: We prefer fewer, higher-quality contributions over numerous mediocre ones.
A couple of things to keep in mind before you submit:
- GitHub Issue
- Make sure the fix or feature is sufficiently documented and discussed in advance in an existing GitHub Issue
- If there are no related issues, we strongly suggest you create a new Issue and discuss your feature or proposal with the Lingo.dev team
- If there is a Discord thread already, please summarize it in a GitHub Issue. This helps to keep everyone in the loop, including open-source contributors and Lingo.dev team members not part of the original conversation. It also serves as documentation for future decisions.
- README update
- If applicable, please add a section with the CLI commands introduced in your PR (what their purpose is and how to use them)
- It is not necessary to update the README file for every change, oftentimes a comprehensive description in the Issue or PR description is enough
- Tests
- Your changes should include unit tests for the main code paths, to make sure nothing breaks
- Changeset
- Add a changeset for your feature or fix (run
pnpm newfrom the repo root)
- Add a changeset for your feature or fix (run
- PR checks
- Make sure all checks pass
- You can run the checks locally in repo root:
...or let GitHub run it in the PR for you.
pnpm install --frozen-lockfile pnpm format:check pnpm turbo build --force pnpm turbo test --force pnpm changeset status --since origin/main
- GitHub Issue
- Make sure to link your PR to the existing Issue(s)
- We may not be able to accept new features without existing Issues
- This does not apply to smaller fixes with sufficient description in the PR
- Existing PRs
- Make sure someone else hasn't already created a PR fixing the same issue.
- PR title
- The title should be a valid Conventional Commit title
- Should start with
feat:,fix:,chore:, etc.
- PR description
- Should contain sufficient description of your PR (unless the linked Issue already does)
- 💡 Tip: Oftentimes less is more. Try to write in your own words; real humans are reviewing your PR.
- Demo video
- For larger features we would really appreciate a quick screen recording showing it in action
- It helps make the review process faster
- You can use open-source Cap, QuickTime on Mac, or any other software you prefer
- We will always try to accept the first viable PR that resolves the Issue
- Please discuss implementation approach beforehand to avoid having PRs rejected
- Please actively discuss with the Lingo.dev team in the PR and related Issue(s)
We use Claude Code to provide automated code reviews on all pull requests. This helps ensure:
- Code quality and maintainability
- Security best practices
- Performance considerations
- Proper test coverage
- Documentation completeness
The automated review will post comments on your PR with suggestions and feedback. While these are helpful guidelines, human reviewers will make the final decisions. If Claude Code identifies critical security issues, please address them promptly.
Thank you!