spryker-community/cli-toolkit

The Spryker Community CLI Toolkit

0.1.0 2024-04-03 15:40 UTC

This package is auto-updated.

Last update: 2024-10-29 08:27:31 UTC


README

Spryker Community CLI Toolkit

A suite of utilities designed to enhance performance in your day-to-day operations with Spryker Commerce OS.

InstallationUsageContributing

Installation

Git clone

git clone https://github.com/spryker-community/cli-toolkit && cd cli-toolkit
bin/cli-toolkit

Composer

composer require --dev spryker-community/cli-toolkit
vendor/bin/cli-toolkit

Usage

You can see all the available commands by executing:

bin/cli-toolkit --help

Prerequisites

Some of the commands use external services like OpenAI or DeepL that requires API credentials. In those cases you will require to add the credential to your .env file.

  1. Copy the template for the environment variables:
cp .env.dist .env
  1. Add your own auth credentials for the service you are using:
CLI_TOOLKIT_DEEPL_API_AUTH_KEY="your_deepl_api_token"
CLI_TOOLKIT_CHATGPT_API_AUTH_KEY="your_chatgpt_api_token"

Generate translations for the Spryker Yves storefront

bin/cli-toolkit translation:yves:generate

Arguments

  • locales: List of locales to which we want the Spryker glossary translated.

Options

  • --working-dir: If specified, use the given directory as Spryker project working directory.
  • --translation-engine: The translation engine to be used for translation generation. Allowed values are deepl or chatgpt [default: "chatgpt"]

Examples

  1. Generate missing translations Yves glossary to Spanish from Spain (es_ES) by ChatGPT.
bin/cli-toolkit translation:yves:generate es_ES --working-dir=../b2b-demo-marketplace- --translation-engine=chatgpt
  1. Generate missing translations Yves glossary to Spanish from Spain (es_ES) and French from France by DeepL.
bin/cli-toolkit translation:yves:generate es_ES fr_FR --working-dir=../b2b-demo-marketplace --translation-engine=deepl

Generate translations for the Spryker Zed backoffice

bin/cli-toolkit translation:zed:generate

Arguments

  • locales: List of locales to which we want the Spryker glossary translated.

Options

  • --working-dir: If specified, use the given directory as Spryker project working directory.
  • --translation-engine: The translation engine to be used for translation generation. Allowed values are deepl or chatgpt [default: chatgpt]

Examples

  1. Generate missing translations Zed glossary to Spanish from Spain (es_ES) by ChatGPT.
bin/cli-toolkit translation:zed:generate es_ES --working-dir=../b2b-demo-marketplace --translation-engine=chatgpt
  1. Generate missing translations Zed glossary to Spanish from Spain (es_ES) and French from France by DeepL.
bin/cli-toolkit translation:zed:generate es_ES fr_FR --working-dir=../b2b-demo-marketplace --translation-engine=deepl

Contributing

We love contributions, big or small. Please don't forget to read the contribution guidelines.

License

This package is released under the MIT license

Supported with ❤️ by the Spryker Community