CLI

Create a CLI Configuration File (Strings)

Content is machine translated from English by Phrase Language AI.

To automatically create a configuration file, follow these steps:

  1. From the command line, type phrase init to create a .phrase.yml file.

    The configuration process starts in the CLI.

  2. Provide:

    • Access token

    • Phrase project ID

    • Locale file format

    • Location of locale files in the project codebase

A basic configuration file is created.

If using a manually created or copied configuration file, place it in one of these locations:

  • The directory in which the CLI client is called.

  • The home directory of the current user ($HOME in Unix, $HomePath in Windows).

  • The path specified in the PHRASEAPP_CONFIG environment variable.

  • Path to configuration file via the --config flag (e.g. /some/path/to/phrase.yml).

Sample configuration file.

GitLab

  • The .phrase.yml configuration file must be present in the repository. The file defines which files to import (pull) or export (push) from the repository.

  • Read and write access are required for the repository.

  • Incorrectly defined configuration files may cause errors. Ensure that the file contains at least one push and one pull target, correct file formats and the correct setting of the update_translations parameter.

  • Use GitLab 9.5 or newer to ensure API compatibility.

GitHub

  • The .phrase.yml configuration file must be present in the repository. The file defines which files to import (pull) or export (push) from the repository.

  • Read and write access are required for the repository.

  • Incorrectly defined configuration files may cause errors. Ensure that the file contains at least one push and one pull target, correct file formats and the correct setting of the update_translations parameter.

  • A GitHub access token for the scope of the repository (public_repo if synchronizing with a public repository).

  • If SSO is enabled in GitHub, it must also be enabled for the access token.

  • The phrase_translations branch cannot be protected.

  • Ensure repository settings do not require signed commits.

BitBucket

The .phrase.yml configuration file must be present in the repository. The file defines which files to import (pull) or export (push) from the repository.

Read and write access are required for the repository.

Incorrectly defined configuration files may cause errors. Ensure that the file contains at least one push and one pull target, correct file formats and the correct setting of the update_translations parameter.

Was this article helpful?

Sorry about that! In what way was it not helpful?

The article didn’t address my problem.
I couldn’t understand the article.
The feature doesn’t do what I need.
Other reason.

Note that feedback is provided anonymously so we aren't able to reply to questions.
If you'd like to ask a question, submit a request to our Support team.
Thank you for your feedback.