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-05-11 07:54:58 UTC


README

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

InstallationUsageContributing

68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737072796b65722d636f6d6d756e6974792f636c692d746f6f6c6b69742f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4349266c6f676f3d676974687562267374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737072796b65722d636f6d6d756e6974792f636c692d746f6f6c6b69743f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737072796b65722d636f6d6d756e6974792f636c692d746f6f6c6b69743f7374796c653d666c61742d737175617265 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6a6f696e2d636f6d6d6572636571756573742d626c75652e7376673f6c6f676f3d646174613a696d6167652f737667253262786d6c3b6261736536342c5044393462577767646d567963326c76626a30694d5334774969426c626d4e765a476c755a7a3069565652474c54676949484e305957356b59577876626d5539496d3576496a382b436a77685245394456466c515253427a646d63675546564354456c44494349744c7939584d304d764c30525552434254566b63674d5334784c79394654694967496d6830644841364c79393364336375647a4d7562334a6e4c3064795958426f61574e7a4c314e57527938784c6a4576524652454c334e325a7a45784c6d52305a43492b436a787a646d6367646d567963326c76626a30694d533478496942705a443069544746355a584a664d53496765473173626e4d39496d6830644841364c79393364336375647a4d7562334a6e4c7a49774d44417663335a6e4969423462577875637a703462476c75617a30696148523063446f764c336433647935334d793576636d63764d546b354f53393462476c7561794967654430694d484234496942355053497763486769494864705a48526f505349784e6e42344969426f5a576c6e61485139496a45326348676949485a705a58644362336739496a41674d4341784e6941784e6949675a573568596d786c4c574a685932746e636d3931626d5139496d356c64794177494441674d5459674d545969494868746244707a6347466a5a54306963484a6c63325679646d55695069416750476c745957646c49476c6b50534a706257466e5a544169494864705a48526f505349784e694967614756705a326830505349784e694967654430694d434967655430694d43494b49434167494768795a575939496d526864474536615731685a3255766347356e4f324a68633255324e437870566b4a50556e63775330646e623046425155464f5531566f5256566e51554642516b46425155464255554e42545546425155467654464535564546425155464352325243564656465155464d523142444c33686f516c464251554644516d7054526b704f436b4642516a5a4b5a3046425a306c52515546516230464251554e424e6b464251575255515546425433426e515546424e6d3142515546474d304e6a645778464f45464251554e58526b4a4e566b5656515546425155467964546842636d553051584e515347514b51334249636b464a646e4e425358707851556c32576b464a52554670636a424263314245575552615447564262324e426357566e51584a6c4d4546776455314255306452515777355130786d646a6842524545345157394f65573542526e4e425747394952417043626e64424c7938345157784e64554a5259574a7651556c79566b46494e454649655739425a6d46335157786a4d454a445554426d51554a4b5155464457577042516c6776515641764c30464c5930467964546842636e55766330464a656e424253584a6f436b464a57484a4253585a7a51556c3351584a6c4e45467964546842636e553451584a314f45467964546842633142494c30464956484e425358707a51556c366355464a646d394253584a7951556c36636b464a6330467954336442636e553451584a314f45454b63437451546b51304c3352425358707351556c716330464a643046795a545242636b38775157354f575546766444684262484d774f564e4a5a6d394253584a57515567325345464752466c425355527951556c7a51584a50643046796454684262474e335151704f61334e42566d356a51565a584c3342425356687451556c7462454648535546425155527251556c6d6245464a5a304676546e6442636d55775158426c54554661627a4e7951556836636b464a646c684253446854515546326255464a616e4a4253585a69436b464a535546785a576442636e55305157784e633046425155527451556c756345464a635374425345686851556c496230464a636e464253585a4a5155686a51584631623046785a5764425a6b747a51554642524739425357357051556c68634546485647344b51556c75636b464a656d70425357566e515559345158457263304677543056425657354953304649616e424253584a6a51556c51576b464a53484a4253585a4f5155687651554642515546795a54424263475651556b4649646e424253584a6e51556c59556770425348707051556c68574546476130467964546842636b387751584a50643046795a5452426330387a51554a49616d394253584a7a51556c366230464a636d3542535735565155673051584572643046796454684263553961526c4a4a596d564253564274436b464a616d394253584a7851556c325755464a5155467354584e42635856765157354f5930466a4e546842526d644857454647626b52425346525251556832526b464956315642526d7044515568515a30464a567a6c4253454e5151555a56515538785255454b596b7056515755326130466a576e4e42556b5977515546425155464255554652515546724d5546434f46564251586442515546436455464652304a42525868585155524e51554642515546794c304642636d55336330464a656e464253584e42636e55766441704253586442636e5a4251584a314e33524253544242635374324c7938764f4730794e6b4e725155464251585a59556c4e5562453142515546425155464251554642515546425155464251554642515546425155464251554642515546425155464251554642436b46425155464251554642515546425155464262316c4c61486471576e6c42536c6c694d324630656a4244596b39544e3345764e69744563474933637a45336553737665446b7664446479647a4a6d556a4258646b3072656d35776445524f53303549646a414b566d64584d4456335a577330616d64684d574a725445706c537a685164585650515446794f46703464444d76574846504e30527a516d3035617a523064584a705454677a513052334e30687a626d34796257646d654842534c325a7a4e6b7874543259335477705553554a46536e56554d545a6c525738355a6d70445330316d4e6973304f4552795a6e706a5955466b566e6430626b526b63574a3662476846616d4e61556a684f5556464552304e6a576b4670576c68495a3170354e32733262304642515546425630704d436c49775645687155565a4c56336442515546425a444254565446475169746a5455526e6231564f4d3273724e304e525155464252574a5456564a43566b4a7156454653515549334c7a5242515546425155465253554a4255555645516b465652304a335a30674b516d644251554e5252554e4255316c75536d6476544552445a33424c61584e7a51554642516b46704d48564d656b46345457704e4d45355557544e5052477442524645304e6b393665546c32596a513555476f724c31464e51793952555546515255564d516770524d464a47556d746b53586472624574544f45704e51554647546c527a526c4256526b5a545654633556565a57576c68324d57644256315a795246637864314a466244466c643277355a316c585379395a64304a72576d4e53625670345455646852555a77436d467464484e324d6a463151556376516d4e495256564757457036643235534d5752755a6b4e6c534774425a584e4f4e325a435756686d574464445a6a5244516e59334b304e6e64304e4664316c56575564536355646f4e79744a6157497651326c766332494b51556c36516d705a4e6c4272536b6454646a5650565859334b315a7361486442624468485457314d4d6c707463485a4765474e585932356a5332567564304e6e62324e55523239785432747759574675635574746358453265585242537a5a32633078486551707a6544497764474a684d33564d62545a31643046425347354c4f4856434f45464a5155466f53576c4e515570445557784252327044576d566a545467326448564251554642536c6853526c6449556d745a57464a735432314f65567058526a426155554635436b31455358704d56455635544652464d465a4552586450616b6c33543270564d45743651586450616b463352473133524546525155464251315977556c5a6f4d467048526a426156484230596a4a53634670756130464e616b463554586b77654531704d48674b546b5a526545314562336c4e52473878546b4e7a643031456233644e5344683464546377515546425157396b52565a5a5a4564536147524856545a6b52327830576c684f4d466c584d58644252456c335457704e644531555358524e56464a56545652424e67704e616b4532546c5256636b314551545a4e52454e5056545649563046425155464252577847564774546456467451304d694943382b436a777663335a6e50676f3d267374796c653d666c61742d737175617265

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: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 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