For most situations, invoking localazy upload
and localazy download
in the correct folder is enough. However, there are numerous parameters that you can use in specific situations.
The general usage pattern for Localazy CLI is:
localazy [proxy] [command] [common options] [groups/subcommands] [subcommand options]
Proxy 🔗
You can define proxy servers for the communication using the --proxy server:port
command parameter. Please remember that HTTPS-compliant proxy server is required.
If your proxy requires basic authentication, you can pass the credentials as --proxy user:[email protected]:port
.
Commands 🔗
- upload - Run upload rules to collect files and upload them to Localazy servers for processing.
- download - Download files from Localazy servers and run download and conversion rules on them.
- list - List files all translated files available on the server.
- languages - List languages available on Localazy including their current state.
- file - Manage (rename and delete) files on the server.
- tag - Manage release tags - list, publish and delete tags.
- cdn - List all files on the Localazy CDN.
- conversion - Access information about file format conversions.
For help, invoke localazy [command] -h
.
Common Options 🔗
All of the commands above require the localazy.json
file and accept these command-line options:
Option | Description |
---|---|
Override the configuration file name. Default: localazy.json |
|
Override the keys file name. See Authorization. Default: localazy.keys.json |
|
Provide the readkey on the command line. See Authorization. | |
Provide the writeKey on the command line. See Authorization. | |
Set the working directory that all paths are relative to. | |
Disable using colored output. |
Upload Options 🔗
Option | Description |
---|---|
Do not perform the actual operation, only simulate the process. No files are uploaded nor written. | |
Quiet mode. Print only important information. | |
Force the upload operation if the validation step fails. | |
The app version used for automatic versioning of deprecated phrases. See Upload Reference. | |
Specify the project slug or ID to ensure that the upload is only performed if matching write and read keys are used. | |
Fail if unknown group is provided on the command line. | |
Provide additional parameters for highly dynamic configurations. | |
Do not wait for the server to process the uploaded data and report errors. |
Download Options 🔗
Option | Description |
---|---|
Perform the operation for the given release tag. | |
Do not perform the actual operation, only simulate the process. No files are uploaded nor written. | |
Quiet mode. Print only important information. | |
Force the upload operation if the validation step fails. | |
Fail if unknown group is provided on the command line. | |
Provide additional parameters for highly dynamic configurations. |
List Options 🔗
Option | Description |
---|---|
Perform the operation for the given release tag. |
Languages Options 🔗
Option | Description |
---|---|
Return the list in the CSV format for machine processing. |
Files 🔗
This command allows management of high-level files on the server and shows corresponding CDN addresses.
List files:
localazy file [common-options] list
Delete file:
localazy file [common-options] delete {fileId}
Rename file:
localazy file [common-options] rename {fileId} [-p new-path] [-f new-name]
Tags 🔗
This command allows managing release tags.
List all available tags including their publishing date and CDN addresses:
localazy tag [common-options] list
Create/publish the current translations under the tag:
localazy tag [common-options] publish {tag-name}
Remove the tag including corresponding data:
localazy tag [common-options] delete {tag-name}
Rename existing tag:
localazy tag [common-options] rename {tag-name} {new-name}
Promote tag to another one (existing or new):
localazy tag [common-options] promote {tag-name} {target-tag}
Merge tags, manipulate string keys and languages:
localazy tag [common-options] merge [merge-parameters] {source-tag} {destionation-tag} {output-tag}
See Release Tags for detailed information on all available commands and merge parameters.
CDN Options 🔗
This command lists all files available on CDN for the latest version or given release tag. Learn more about Localazy CDN.
Option | Description |
---|---|
Perform the operation for the given release tag. |
Conversions 🔗
This command allows for listing supported conversion:
localazy conversion [common-options] list
And for obtaining detailed information about selected conversion:
localazy conversion [common-options] format {conversion}
Groups 🔗
Groups allow for running only selected rules for upload and download.
For upload, the group the collected files belongs to is sent to the server as additional information and you can later use it in your download rules to decided what to do with the files.
Let’s consider this sample configuration file:
{
"upload": {
"files": [
{
"pattern": "app/files/en.json"
},
{
"group": "library",
"pattern": "library/files/en.json"
},
{
"group": "web",
"pattern": "web/files/en.json"
}
]
}
}
For the first upload rule with the pattern app/files/en.json
, no group is provided. Missing or empty group is considered default and is always applied.
By invoking Localazy CLI with groups provided, you can easily decide what files to upload:
- Invoking
localazy upload
uploads onlyapp/files/en.json
as the default group is always applied. - Invoking
localazy upload library
uploadsapp/files/en.json
andlibrary/files/en.json
as both the default group and the library group are applied. - Invoking
localazy upload library web
uploads all three files.
Groups are very effective for selecting resources you want to upload / download. They are also great for having the default rule for the source language and a kind of all
rule for the initial upload of all your existing translations.
Note: You can access the group the collected files belonged to when they were uploaded but groups provided on the command line for download only filter the download rules.