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.
Install
Section titled “Install”npm install -g @ownlate/cliOr run it without installing:
npx @ownlate/cli <command>There is a container image too:
docker run --rm -it \ -v "$HOME/.ownlate:/root/.ownlate" \ -v "$(pwd):/app" -w /app \ ownlate/ownlate-cli <command>Quick start
Section titled “Quick start”ownlate login # store an API keyownlate init # pick a project, write the configownlate push # upload source stringsownlate pull # download translationsConfiguration
Section titled “Configuration”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}.jsonAll 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| Key | Meaning |
|---|---|
project_id | Which project to sync with |
api_token_env | Name of the environment variable holding the token, instead of ~/.ownlate |
files[].source | The source file to upload |
files[].translation | Where translated files are written; must contain {lang} |
files[].flat | Keep nested keys as they are instead of flattening |
files[].languages_mapping | Map 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.
Authentication
Section titled “Authentication”ownlate login # prompts for an API key, verifies it, saves ~/.ownlateownlate logout # removes ~/.ownlateFor a pipeline, point api_token_env at an environment variable instead:
export OWNLATE_API_TOKEN=own_xxxxxxxxxxxxownlate pushCreate keys under Profile → API keys — see REST API.
Commands
Section titled “Commands”ownlate init
Section titled “ownlate init”Fetches your projects, lets you pick one, and writes the configuration for the current directory.
ownlate push
Section titled “ownlate push”Uploads every files[].source and creates or updates segments from it.
| Flag | Description |
|---|---|
-w, --watch | Watch the source files and push again on every save |
-n, --dry-run | Show what would be pushed without uploading anything |
ownlate pull
Section titled “ownlate pull”Downloads translated files into the paths given by files[].translation.
| Flag | Description |
|---|---|
-l, --lang <code> | Pull one language only |
ownlate status
Section titled “ownlate status”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| Flag | Description |
|---|---|
--min <percent> | Exit with code 1 if any language is below this — the CI gate |
ownlate translate
Section titled “ownlate translate”Pre-translates untranslated segments. Runs in the background on the server; check progress afterwards with ownlate status.
| Flag | Description |
|---|---|
-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”ownlate project listownlate project create "Mobile App" --source en --langs fr,de,es| Flag | Description |
|---|---|
-s, --source <lang> | Source language code |
-l, --langs <codes> | Target languages, comma-separated |
In a pipeline
Section titled “In a pipeline”- 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.