base on SimpleLocalize CLI is a developer-friendly command-line tool for uploading and downloading translation files <p align="center"> <a href="https://simplelocalize.io/"> <img src="static/logo-square-white-rounded.png" width="96" height="96"> </a> </p> <h3 align="center">Translation Management for software projects</h3> <p align="center">The easiest way to manage translation files for web and mobile apps.</p> [![codecov](https://codecov.io/gh/simplelocalize/simplelocalize-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/simplelocalize/simplelocalize-cli) SimpleLocalize CLI is a command-line tool that allows you to manage translations in your software project, and it's a great tool for CI/CD pipelines and localization automation. - [Synchronize files](https://simplelocalize.io/auto-translation/) - keep in sync all your translation files - [Auto-translate](https://simplelocalize.io/auto-translation/) - auto-translate texts in seconds - [Host translations](https://simplelocalize.io/translation-hosting/) - manage your hosted translations - [GitHub Actions support](https://github.com/simplelocalize/github-action-cli/) - seemles integration with GitHub Actions ## Installation The installation process is automated by command-line scripts. Both scripts for Windows (PowerShell) and macOS/Linux/Windows downloads a binary file with CLI, copies it to user files and makes it available to run anywhere in the system from a command-line. The CLI supports macOS (both Apple Silicon and Intel), Linux (x86 and ARM64), and Windows. ```bash # macOS / Linux / Windows (WSL) curl -s https://get.simplelocalize.io/2.10/install | bash # Windows (PowerShell) . { iwr -useb https://get.simplelocalize.io/2.10/install-windows } | iex; # npm - https://github.com/simplelocalize/simplelocalize-cli-npm npm install @simplelocalize/cli ``` [GitHub Wiki: Installation](https://github.com/simplelocalize/simplelocalize-cli/wiki) ## Usage The command-line tool offers several commands to execute. All of them requires Project API Key that is unique for each project. You can set `apiKey` via [configuration file](/simplelocalize-cli/wiki/Configuration-file), pass it as parameter with `--apiKey` or by environment variable `SIMPLELOCALIZE_API_KEY`. ```bash simplelocalize [command] ...parameters ``` [GitHub Wiki: Usage](https://github.com/simplelocalize/simplelocalize-cli/wiki) ## Upload translations Upload command takes your local files and uploads them to SimpleLocalize. ```bash simplelocalize upload --apiKey PROJECT_API_KEY --uploadPath INPUT_FILE --uploadFormat FILE_FORMAT --uploadLanguageKey en ``` [GitHub Wiki: Upload translations](/simplelocalize/simplelocalize-cli/wiki/Upload-translations) ## Download translations Download command takes translations from SimpleLocalize and saves them to your local files. ```bash simplelocalize download --apiKey PROJECT_API_KEY --downloadPath DOWNLOAD_PATH --downloadFormat FILE_FORMAT --downloadLanguageKey en,de,fr ``` [GitHub Wiki: Download translations](/simplelocalize/simplelocalize-cli/wiki/Download-translations) ## Auto-translate strings Auto-translate command starts auto-translation tasks for project languages and waits for the finish. ```bash simplelocalize auto-translate --apiKey PROJECT_API_KEY ``` [GitHub Wiki: Auto-translate strings](/simplelocalize/simplelocalize-cli/wiki/Auto%E2%80%90translate-strings) ## Translation Hosting There are two commands that operates on [translation hosting](https://simplelocalize.io/translation-hosting/) resources which is `publish` and `pull`. ### Publish translations Publish translations between translation editor and hosting or between hosting environments. ```bash simplelocalize publish --apiKey PROJECT_API_KEY --environment _latest ``` [GitHub Wiki: Pull resources](/simplelocalize/simplelocalize-cli/wiki/Translation-Hosting) ### Pull resources Pull command downloads files from translation hosting. ```bash simplelocalize pull --apiKey PROJECT_API_KEY --pullPath ./hosting/ --environment _latest ``` [GitHub Wiki: Pull resources](/simplelocalize/simplelocalize-cli/wiki/Translation-Hosting) ## Additional commands ### Initalize configuration file Command creates a sample [configuration file](/simplelocalize/simplelocalize-cli/wiki/Configuration-file) in the current directory. ```bash simplelocalize init ``` [GitHub Wiki: Additional commands](/simplelocalize/simplelocalize-cli/wiki/Additional-commands) ### Get project details Command gets project details and prints them. ```bash simplelocalize status --apiKey PROJECT_API_KEY ``` [GitHub Wiki: Additional commands](/simplelocalize/simplelocalize-cli/wiki/Additional-commands) ### Purge translations Command removes all translations, translation keys and languages. ```bash simplelocalize purge --apiKey PROJECT_API_KEY ``` [GitHub Wiki: Additional commands](/simplelocalize/simplelocalize-cli/wiki/Additional-commands) ### Extract translation keys Extract command finds translation keys and translations from the source code. ```bash simplelocalize extract --searchDir SEARCH_DIRECTORY --projectType PROJECT_TYPE ``` [GitHub Wiki: Additional commands](/simplelocalize/simplelocalize-cli/wiki/Additional-commands) ## Configuration file Create configuration file to to simplify the bash commands. Arguments used in command always override properties set in the configuration file. ```bash # It load simplelocalize.yml file by default simplelocalize upload ``` [GitHub Wiki: Configuration file](/simplelocalize/simplelocalize-cli/wiki/Configuration-file) ## Proxy support SimpleLocalize CLI supports HTTP and HTTPS proxies, and it respects the `http_proxy`, `https_proxy` environment variables. Here are some examples of how to set proxy environment variables in Linux and macOS: ```bash export http_proxy=http://someproxy.com export http_proxy=http://someproxy.com:8080 export http_proxy=http://user:[email protected]:8080 ``` [GitHub Wiki: Proxy support](/simplelocalize/simplelocalize-cli/wiki/Proxy-Support) ## Support Please refer to the [official SimpleLocalize documentation](https://simplelocalize.io/docs/cli/get-started/). That should help you troubleshoot common issues. For additional help, you can reach out to us on one of these channels: - [GitHub](https://github.com/simplelocalize/simplelocalize-cli/issues) (Bug and issue reports) - [Email](mailto:[email protected]) (General support) - [Changelog](https://simplelocalize.io/changelog/) (Product updates) - [YouTube](https://www.youtube.com/channel/UCBpYo2UnHwDGyK175SAKTig) (How-to tutorials) ## License See [LICENSE](/LICENSE) for more details. ", Assign "at most 3 tags" to the expected json: {"id":"4795","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"