Skip to content

CLI

@ownlate/cli pushes your source strings up and pulls translations back down. It is the same file format the Git integration reads, so a repository configured for one works with the other.

Terminal window
npm install -g @ownlate/cli

Or run it without installing:

Terminal window
npx @ownlate/cli <command>

There is a container image too:

Terminal window
docker run --rm -it \
-v "$HOME/.ownlate:/root/.ownlate" \
-v "$(pwd):/app" -w /app \
ownlate/ownlate-cli <command>
Terminal window
ownlate login # store an API key
ownlate init # pick a project, write the config
ownlate push # upload source strings
ownlate pull # download translations

The CLI looks for ownlate.yml in the current directory.

project_id: f4092389-de6a-49ee-af84-46d59ba618f0
files:
- source: locales/en.json
translation: locales/{lang}.json

All available options:

project_id: <uuid>
api_token_env: OWNLATE_API_TOKEN
files:
- source: locales/en.json
translation: locales/{lang}.json
flat: false
languages_mapping:
zh-Hans: zh_CN
zh-Hant: zh_TW
KeyMeaning
project_idWhich project to sync with
api_token_envName of the environment variable holding the token, instead of ~/.ownlate
files[].sourceThe source file to upload
files[].translationWhere translated files are written; must contain {lang}
files[].flatKeep nested keys as they are instead of flattening
files[].languages_mappingMap a language code to a different filename fragment

Without an ownlate.yml, the CLI falls back to the project configuration ownlate init stored in ~/.ownlate.

Terminal window
ownlate login # prompts for an API key, verifies it, saves ~/.ownlate
ownlate logout # removes ~/.ownlate

For a pipeline, point api_token_env at an environment variable instead:

Terminal window
export OWNLATE_API_TOKEN=own_xxxxxxxxxxxx
ownlate push

Create keys under Profile → API keys — see REST API.

Fetches your projects, lets you pick one, and writes the configuration for the current directory.

Uploads every files[].source and creates or updates segments from it.

FlagDescription
-w, --watchWatch the source files and push again on every save
-n, --dry-runShow what would be pushed without uploading anything

Downloads translated files into the paths given by files[].translation.

FlagDescription
-l, --lang <code>Pull one language only

Prints a progress table for every target language.

Project My App f4092389-…
Lang ████████████░░░░░░░░ % Total Untrans Draft Transl Approved
────────────────────────────────────────────────────────────────────────────
fr ████████████████████ 100% 484 0 0 0 484
de ██████████░░░░░░░░░░ 51% 484 237 12 89 146
es ████░░░░░░░░░░░░░░░░ 20% 484 387 4 51 42
────────────────────────────────────────────────────────────────────────────
3 langs 57% 1452 624 16 140 672
FlagDescription
--min <percent>Exit with code 1 if any language is below this — the CI gate

Pre-translates untranslated segments. Runs in the background on the server; check progress afterwards with ownlate status.

FlagDescription
-l, --lang <code>One language only
-p, --provider <type>tm for translation memory (default), mt for the built-in AI engine
-s, --score <n>Minimum memory match score, 0–100 (default 100, applies to tm)

See Translation memory for what each source does to a segment’s status.

ownlate project list and ownlate project create

Section titled “ownlate project list and ownlate project create”
Terminal window
ownlate project list
ownlate project create "Mobile App" --source en --langs fr,de,es
FlagDescription
-s, --source <lang>Source language code
-l, --langs <codes>Target languages, comma-separated
- name: Push source strings
run: npx @ownlate/cli push
env:
OWNLATE_API_TOKEN: ${{ secrets.OWNLATE_API_TOKEN }}
- name: Fail if a language is behind
run: npx @ownlate/cli status --min 90
env:
OWNLATE_API_TOKEN: ${{ secrets.OWNLATE_API_TOKEN }}

Push on every merge to your default branch, and pull on a schedule or before a release — that keeps the source of truth in Ownlate and the build reproducible from the repository.