Docs

Commands

You can get information about commands in the CLI by running the following command:

polygot -h

To get help for a specific command, run the following command, replacing [command] by the command name:

polygot help [command]

init

polygot init

Initialize a Polygot project. This command links your Polygot project to your source code. Learn more about project initialization on the configuration documentation page.

languages

polygot languages

Display the list of languages supported by Polygot, with their ISO 639-1 code. Use these ISO codes for commands requesting one or more languages as parameters.

login

polygot login

Authenticate your device to your Polygot account. Authentication is required in order to use the Polygot CLI (except for utility commands). Learn more about CLI authentication on the dedicated page.

logout

polygot logout

Log out from your Polygot account. Learn more about CLI authentication on the dedicated page.

project

create

polygot project create

Start the prompt for the creation of a new Polygot project.

info

polygot project info

Display the current project's information (name, source language, target languages, description).

language

add

polygot project language add <langs>

Add one or several new languages to the current project.

ParameterDescriptionRequiredExample
langsThe ISO 639-1 codes of the languages to addtruefr,it
Adding new languages does not generate automatically translations. Translations will be generated during the next translation job, initiated by the polygot translate or polygot synchronize command.

remove

polygot project language remove <langs>

Remove one or several languages from the current project.

ParameterDescriptionRequiredExample
langsThe ISO 639-1 codes of the languages to addtruefr,it
Removing languages from your project will irretrievably delete all the translated phrases associated.

list

polygot project list

List all the Polygot projects associated to your account.

pull

sources

polygot pull sources

Pull all the phrase files in the project's source language, and save them on your device.

translations

polygot pull translations [options]

Pull phrase files in one or several languages, and save them on your device to the path defined by your configuration file.

OptionDescriptionDefaultExample
-l, --languageThe ISO 639-1 codes of the languages you want to pull. All languages if none.None (all languages)-l fr
--no-fallbackDisable fallback of missing translations to source phrases. Fallback enabled by default.

push

sources

polygot push sources

Push all the local source files, found in the paths defined by your configuration file.

translations

polygot push translations [options]

Push all the local translation files, found in the paths defined by your configuration file. This command allows you to import existing translations to your project.

OptionDescriptionDefaultExample
-l, --languageThe ISO 639-1 codes of the languages you want to push. All languages if none.None (all languages)-l fr

status

polygot status

Display the status of your Polygot project. The status indicates whether translations are waiting to be generated, or whether all translations are up to date.

synchronize

polygot synchronize

Synchronize local source files with the Polygot project. The synchronization consists of 3 steps:

  1. push local sources (equivalent to polygot push sources)
  2. launch a translation job (equivalent to polygot translate)
  3. pull translations (equivalent to polygot pull translations)

translate

polygot translate

Run a translation job, which will generate all translations for the new source phrases.

whoami

polygot whoami

Print the currently logged in user.