phrase / phrase-cli

CLI for the Phrase API
https://developers.phrase.com
MIT License
42 stars 6 forks source link

Provide CLI as binary npm package #110

Closed nlopin closed 1 year ago

nlopin commented 1 year ago

Hello! I'm not sure where should I write the request, point me to the right direction please.

When used in CI, Phrase provides not the greatest develoepr experience. If Docker is used, it requires a developer to find the correct url to the CLI on the website, install it, give execution permissions and then run.

In web projects it usually expected that project can setup itself by only using npm and npx commands. It would be nice to have phrase-cli published in npm as binary package, so the user can just do npx phrase pull in the project to get all the translations.

What do you think?

github-actions[bot] commented 1 year ago

Hello,

Thanks for reaching out to us.

I will start looking into your issue and get back to you as soon as I know more.

Please make sure you provided all the information that could be helpful with the investigation (see the automated response you received when creating this ticket). I might have to prioritize your request against other support tickets, so please indicate if there is a particular urgency to your request and whether you are blocked by the issue you reported.

Thank you for your understanding, and I'll get back to you shortly.

Best, Ryan from the Phrase Technical Support Team

Comment by Ryan

github-actions[bot] commented 1 year ago

Hello,

Can you first create a case by submitting a ticket via support@phrase.com.

Please provide me with the following information, so I can investigate further:

Looking forward to your response and wishing you a good day!

Best, Ryan from the Phrase Technical Support Team

Comment by Ryan

nlopin commented 1 year ago

Folks, I don't understand why you use GitHub if this boilerplate is an answer to an issue.

forelabs commented 1 year ago

Hi @nlopin ,

I am sorry that our communication flow did not worked great in your case. Thanks for the idea of bringing phrase cli to the npm repository. Unfortunately we have no plans to prioritize this request for the time being.

Tip: If you are using mac the phrase cli is part of homebrew.

nayaabkhan commented 1 year ago

@nlopin We've got a similar use case – We'd like to download phrases for building our project on Vercel (CD). Currently, the workaround is to wget the binary from GitHub. While possible, it becomes a little cumbersome to write a single line to download for all platforms and architectures our devs are on.

I'm considering to create a package myself at the moment with a postinstall script to download the correct binary for the platform and architecture. Regardless, I believe the PhraseApp team should consider owning and maintaining the package.

nayaabkhan commented 1 year ago

I've shipped the first version of this.

GitHub: https://github.com/nayaabkhan/phrase-cli NPM: https://www.npmjs.com/package/phrase-cli

It is only tested on:

~Also, I'm yet to upload the packages for Linux-32 and Linux-ARM because of the 24-hour policy of NPM for removed packages.~ Done ✅

nlopin commented 1 year ago

Thank you @nayaabkhan 👍 Great work, I'll use your implmenetation

We did exactly the same, wgetting the binary in the CI. It is alright, but there are nicer ways

forelabs commented 1 year ago

Thank you @nayaabkhan for providing this solution. Another solution I missed to call out is the asdf plugin we provide officially:

https://github.com/phrase/asdf-phrase

You can read more about the asdf plugin manager here: https://asdf-vm.com/