Getting started

# Installation

Add the gem, create a config file, and point it at your LLM provider.

## Add the gem

In your app's Gemfile.

locallingo is a development-time tool — it never runs in production — so put it in the `:development` group. It pulls in [RubyLLM](https://github.com/crmne/ruby_llm) as its provider client.

```ruby
group :development do
  gem "locallingo"
end
```

Then `bundle install`.

## Generate the binstub

The gem installs an executable called `lingo`. Generate a binstub so you can run it via `bin/lingo` inside your app's bundle:

```ruby
bundle binstubs locallingo
```

## Provider credentials

locallingo never stores API keys. RubyLLM reads them from the environment based on the provider you configure — for example `OPENAI_API_KEY` for OpenAI or `ANTHROPIC_API_KEY` for Anthropic.

```ruby
OPENAI_API_KEY=sk-...
```

> **Note:** Only translation and the optional AI quality pass need credentials. `status`, `validate`, `sync`, and the static quality checks run with no key at all.

## Create the config file

Add a `.locallingo.yml` at your app root. The smallest useful config names your source and target locales; every other key has a sensible default (see the [Configuration reference](https://locallingo.zoolutions.llc/docs/configuration-reference)).

```ruby
defaults:
  source_locale: en
  target_locales: [de, sv]

  provider: openai
  translate:
    model: gpt-5-mini
  quality:
    model: gpt-4o-mini

  context: "Acme, a business application"
  glossary:
    entity: "business/company account holder"
```

That's it — head to the [Quick start](https://locallingo.zoolutions.llc/docs/quick-start).