CLI
The 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”The container image — the same one the GitHub Action runs:
docker run --rm -it \ -v "$HOME/.ownlate:/root/.ownlate" \ -v "$(pwd):/app" -w /app \ globalartltd/ownlate-cli <command>Or build it from source:
cargo install --git https://github.com/OwnLate/ownlate ownlate-cliQuick 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 # forgets the key in ~/.ownlateOn a self-hosted installation, give the address of its API once; it is kept in ~/.ownlate
and stays there after ownlate logout:
ownlate login --api-url https://api.ownlate.example.comThe address is taken from --api-url, then from OWNLATE_API_URL, then from ~/.ownlate,
and without any of them the CLI talks to https://api.ownlate.com.
For 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.
Moving from Crowdin? ownlate init --from crowdin.yml writes an ownlate.yml with the same file mappings: every language placeholder becomes {lang}, file name placeholders become a wildcard, and languages_mapping carries over. Placeholders whose codes differ from Ownlate codes, such as %android_code%, are converted with a note to add a mapping. An existing ownlate.yml is never overwritten. Run ownlate init afterwards to pick the project.
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: docker run --rm -v "$PWD:/app" -w /app -e OWNLATE_API_TOKEN globalartltd/ownlate-cli push env: OWNLATE_API_TOKEN: ${{ secrets.OWNLATE_API_TOKEN }}
- name: Fail if a language is behind run: docker run --rm -v "$PWD:/app" -w /app -e OWNLATE_API_TOKEN globalartltd/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.