Skip to main content

Usage

tm also accepts the alias translation-memory.

What this command family does

These commands operate on Phrase’s .phrase.yml (or explicit flags) directly. They are separate from Hyperlocalise native i18n.yml and sync push / sync pull workflows. Use native sync when you want Hyperlocalise-managed entry sync through the Phrase adapter. Use this file-mode surface when you want a closer replacement for Phrase Strings CLI push / pull file workflows. Use them for:
  • source-file upload from phrase.push.sources[]
  • translation download into phrase.pull.targets[]
  • source download with explicit flags (no config-file mode)
  • glossary and translation-memory download
  • config validation against .phrase.yml
Config lookup order:
  1. --config
  2. PHRASEAPP_CONFIG
  3. .phrase.yml in the current directory
  4. $HOME/.phrase.yml
In config mode, Hyperlocalise resolves the token in this order:
  1. phrase.access_token as a literal value, or as $VAR / ${VAR} from that named environment variable
  2. PHRASE_ACCESS_TOKEN, then PHRASE_API_TOKEN, only when phrase.access_token is omitted or empty
If phrase.access_token is an environment reference ($VAR / ${VAR}), Hyperlocalise uses that variable only. An unset or empty reference does not fall through to PHRASE_ACCESS_TOKEN or PHRASE_API_TOKEN. Set the referenced variable, or omit access_token so the default env vars apply. Manual flag commands (and config mode when you pass --token-env) read --token-env (default PHRASE_API_TOKEN). If you set a custom --token-env and it is empty, Hyperlocalise then tries PHRASE_API_TOKEN. --api-base-url overrides phrase.host. upload sources and download translations use config mode when you pass --config, or when a config file resolves and you do not set --project-id, --format, or (for upload) --file / (for download) --output. download sources, glossary download, and tm download are flag-only.

Supported config fields

These drive Hyperlocalise Phrase file mode under the phrase: key:
  • access_token
  • project_id
  • file_format
  • host
  • locale_mapping
  • push.sources[].file
  • push.sources[].project_id
  • push.sources[].params.locale_id
  • push.sources[].params.file_format
  • push.sources[].params.branch
  • push.sources[].params.tags
  • push.sources[].params.update_translations
  • push.sources[].params.update_translation_keys
  • push.sources[].params.update_descriptions
  • push.sources[].params.skip_upload_tags
  • push.sources[].params.skip_unverification
  • push.sources[].params.file_encoding
  • push.sources[].params.locale_mapping
  • push.sources[].params.format_options
  • push.sources[].params.autotranslate
  • push.sources[].params.mark_reviewed
  • pull.targets[].file
  • pull.targets[].project_id
  • pull.targets[].params.locale_id
  • pull.targets[].params.file_format
  • pull.targets[].params.branch
  • pull.targets[].params.tags
  • pull.targets[].params.include_empty_translations
  • pull.targets[].params.exclude_empty_zero_forms
  • pull.targets[].params.include_translated_keys
  • pull.targets[].params.keep_notranslate_tags
  • pull.targets[].params.encoding
  • pull.targets[].params.include_unverified_translations
  • pull.targets[].params.use_last_reviewed_version
  • pull.targets[].params.fallback_locale_id
  • pull.targets[].params.format_options
  • pull.targets[].params.source_locale_id
  • pull.targets[].params.translation_key_prefix
  • pull.targets[].params.filter_by_prefix
  • pull.targets[].params.use_locale_fallback
  • pull.targets[].params.skip_unverified_translations
Path placeholders in file values: <locale_name>, <locale_code>, <tag>, <tags>.

Phrase CLI compatibility

Official Phrase Strings CLI names map as follows: Unlike Crowdin file mode, unknown top-level YAML keys under .phrase.yml are silently dropped. Only fields listed above are applied. These push.sources[].params and pull.targets[].params values apply in config mode only. Manual flag mode exposes a smaller set (--update-translations, --skip-upload-tags, --branch, --tag). --dry-run with locale placeholders in config may require --source-locale or --target-locale because dry-run cannot call Phrase to enumerate locales.

Unsupported features

This file-mode implementation does not support:
  • phrase init
  • phrase push / phrase pull command names
  • phrase locales list
  • phrase uploads cleanup and push --wait
  • glossary or TM upload (download exists)
  • Phrase Strings API commands such as keys, translations, and jobs
  • interactive Phrase project bootstrap

Examples

Validate config:
Validate a specific file:
Upload sources from .phrase.yml:
Preview a source upload without calling Phrase:
Upload one source file with flags:
Download a source locale to a file:
download sources does not read .phrase.yml. Credentials come from --token-env (default PHRASE_API_TOKEN) or PHRASE_API_TOKEN. Download translations from .phrase.yml:
Download one locale with flags. Use %locale% in --output when you pass more than one --target-locale:
Or configure the same workflow in .phrase.yml:
Download a glossary:
Download translation memory as TMX: