https://github.com/localizely/localizely-cli
https://github.com/localizely/localizely-cli
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/localizely/localizely-cli
- Owner: localizely
- License: mit
- Created: 2022-10-28T15:30:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-23T12:04:42.000Z (7 months ago)
- Last Synced: 2025-04-23T13:29:33.267Z (7 months ago)
- Language: Go
- Homepage: https://localizely.com/cli/
- Size: 165 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- trackawesomelist - Localizely (⭐5) - Open source tool that helps you sync localization files between your source code and the Localizely platform. ([MIT (⭐5)](https://github.com/localizely/localizely-cli/blob/main/LICENSE)) (Recently Updated / [Apr 28, 2025](/content/2025/04/28/README.md))
README
# Localizely CLI
The [Localizely CLI](https://localizely.com/cli/) is a command line tool that helps you sync localization files between your project and the Localizely platform.
[Localizely](https://localizely.com/) is a translation management platform that helps you translate texts in your app for targeting multilingual market.
## Install
The Localizely CLI can be installed on all major platforms (MacOS, Linux, and Windows).
You can find more details about the installation below.
### Download from GitHub Releases
[Download](https://github.com/localizely/localizely-cli/releases) the binary for your platform, unzip it, and place the executable in the path. That's it.
### Docker
Run the Localizely CLI from Docker.
```bash
docker run --rm localizely/localizely-cli
```
_**Note:** This requires you to have Docker installed on your system._
### Build from source
Clone the repo and build from the source.
Clone the repository
```bash
git clone https://github.com/localizely/localizely-cli.git
```
Move to the project directory
```bash
cd localizely-cli
```
Download project dependencies
```bash
go mod download
```
Build the project
```bash
go build
```
After successfully completing the above steps, you should see the executable for your platform in the root of the project.
_**Note:** This requires you to have Go installed on your system._
## Usage
Below you can find a brief description of the available commands.
### Init
Configure your Localizely client.
This command offers two modes: interactive and template. The first one will guide you through the configuration of your Localizely client. The second one will generate a template file that needs to be updated with your config data.
After executing this command, a [configuration file](https://localizely.com/configuration-file/) (`localizely.yml`) will be created for you.
The interactive mode
```bash
localizely-cli init
```
The template mode
```bash
localizely-cli init --mode template
```
_**Note:** API token entered through interactive mode is saved in the ~/.localizely/credentials.yaml file._
### Pull
Pull localization files from Localizely.
Depending on your workflow, you can use this command by relying on the external configuration (the `localizely.yml` file), or by passing your configuration through flags.
Rely on the external configuration
```bash
localizely-cli pull
```
Pass configuration through flags
```bash
localizely-cli pull \
--api-token 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
--project-id 01234567-abcd-abcd-abcd-0123456789ab \
--file-type json \
--files "file[0]=lang/en.json","locale_code[0]=en","file[1]=lang/de_DE.json","locale_code[1]=de-DE" \
--export-empty-as empty \
--include-tags new,updated \
--exclude-tags removed
```
### Push
Push localization files to Localizely.
Depending on your workflow, you can use this command by relying on the external configuration (the `localizely.yml` file), or by passing your configuration through flags.
Rely on the external configuration
```bash
localizely-cli push
```
Pass configuration through flags
```bash
localizely-cli push \
--api-token 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef \
--project-id 01234567-abcd-abcd-abcd-0123456789ab \
--files "file[0]=lang/en.json","locale_code[0]=en","file[1]=lang/de_DE.json","locale_code[1]=de-DE" \
--overwrite \
--reviewed=false \
--tag-added new,new-feat-x \
--tag-updated updated,updated-feat-x \
--tag-removed removed
```
### Update
Update Localizely CLI to the latest version.
This command checks if there is a newer version of the `localizely-cli` available. If there is, you will be prompted to confirm the update.
```bash
localizely-cli update
```
## Contributing
If anything feels off, or you would like to propose some functionality, feel free to do it through [GitHub Issue Tracker](https://github.com/localizely/localizely-cli/issues).
## Useful links
- [Localizely CLI Docs](https://localizely.com/cli/)
- [Localizely API Docs](https://api.localizely.com/swagger-ui/index.html)
- [Localizely Configuration File](https://localizely.com/configuration-file/)