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
--configPHRASEAPP_CONFIG.phrase.ymlin the current directory$HOME/.phrase.yml
phrase.access_tokenas a literal value, or as$VAR/${VAR}from that named environment variablePHRASE_ACCESS_TOKEN, thenPHRASE_API_TOKEN, only whenphrase.access_tokenis omitted or empty
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 thephrase: key:
access_tokenproject_idfile_formathostlocale_mappingpush.sources[].filepush.sources[].project_idpush.sources[].params.locale_idpush.sources[].params.file_formatpush.sources[].params.branchpush.sources[].params.tagspush.sources[].params.update_translationspush.sources[].params.update_translation_keyspush.sources[].params.update_descriptionspush.sources[].params.skip_upload_tagspush.sources[].params.skip_unverificationpush.sources[].params.file_encodingpush.sources[].params.locale_mappingpush.sources[].params.format_optionspush.sources[].params.autotranslatepush.sources[].params.mark_reviewedpull.targets[].filepull.targets[].project_idpull.targets[].params.locale_idpull.targets[].params.file_formatpull.targets[].params.branchpull.targets[].params.tagspull.targets[].params.include_empty_translationspull.targets[].params.exclude_empty_zero_formspull.targets[].params.include_translated_keyspull.targets[].params.keep_notranslate_tagspull.targets[].params.encodingpull.targets[].params.include_unverified_translationspull.targets[].params.use_last_reviewed_versionpull.targets[].params.fallback_locale_idpull.targets[].params.format_optionspull.targets[].params.source_locale_idpull.targets[].params.translation_key_prefixpull.targets[].params.filter_by_prefixpull.targets[].params.use_locale_fallbackpull.targets[].params.skip_unverified_translations
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 initphrase push/phrase pullcommand namesphrase locales listphrase uploads cleanupandpush --wait- glossary or TM upload (download exists)
- Phrase Strings API commands such as keys, translations, and jobs
- interactive Phrase project bootstrap
Examples
Validate config:.phrase.yml:
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:
%locale% in --output when you pass more than one --target-locale:
.phrase.yml: