-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a quickstart command to install fcli #591
Comments
Hey @MikeTheSnowman, thanks for the suggestion. This is something that has been on my mind as well, however some potential issues:
Some ideas that come to mind to mitigate some of these issues:
As an additional thought, we could also consider integrating fcli into various package managers. I think a colleague suggested asdf, but we could also consider standard OS package managers like |
Hey @rsenden. Here are my responses to th potential issues that you brought up:
I'm still thinking about the other ideas that you mentioned as I'm thinking that there's probably a simpler solution. I guess in my head, the
curl -L https://gist.github.com/MikeTheSnowman/88d64142a92374c8835fc2c1c1fe9199/raw/fcli-install-example.sh | bash -s -- dev
curl -L https://gist.github.com/MikeTheSnowman/88d64142a92374c8835fc2c1c1fe9199/raw/fcli-install-example.sh | bash -s -- v2.x
curl -L https://gist.github.com/MikeTheSnowman/88d64142a92374c8835fc2c1c1fe9199/raw/fcli-install-example.sh | bash -s -- v1.x
curl -L https://gist.github.com/MikeTheSnowman/88d64142a92374c8835fc2c1c1fe9199/raw/fcli-install-example.sh | bash -s -- v2.2.2 |
Hi @MikeTheSnowman, fcli doesn't check (default) installation directories to identify whether a particular tool has been installed or not; it keeps state data about installed tools in the fcli state directory ( To have fcli recognize the installation, we'd either need to create the appropriate JSON file in the fcli state directory (which would probably be a bad choice as we'd need to duplicate logic/JSON structure across fcli and installation script), or the script must utilize fcli to perform the installation. So, to utilize installation logic already present in fcli, and have fcli recognize the installation afterwards, I think the installation script would need to:
This is basically what our GitHub Action is currently doing, main drawback is that we're downloading fcli twice (same or different version); once for use by the installation script, once through the As for verifying integrity of the installation script, not sure whether we can create a one-line command that that downloads the script, verifies its integrity, and then runs it (independent of whether we verify hash or signature). I think signature is better than hash. The hash will change whenever we update the script, so we'd need to constantly update the documentation that shows the one-line command to use the new hash. Verifying signature uses a constant public key, so we don't need to update the one-line command on every script change. As for As for Note that fcli also installs wrapper scripts, for example a command like Potentially we could have fcli support installing the wrapper scripts to a different directory like |
Enhancement Request
The TL/DR explanation:
Provide a "quickstart" command that makes it easy to install fcli. We could provide something like:
curl <URL_TO_INSTALL_SCRIPT> | bash
Detailed explanation:
FCLI is currently a standalone binary and we allow for users to determine where they want to "install" the fcli binary.
I believe that there is a large population of users who simply don't want to think about something like that and would like a simpler way to just get the latest version of FCLI.
Even with other popular projects, they provide an installation script that will:
Adding on to this idea, if we make the installation script available from the git repo, then we can provide a one-liner in the README to make it super simple for users and devops people to download/install the latest version.
For example:
curl <URL_TO_INSTALL_SCRIPT> | bash
Inside the installation script, I've found that the following command works well to retrieve the latest version of fcli (for Linux). Please note that this does not make any use of non-standard tools like jq to maintain portability:
For completeness, here's the one-liner for downloading a specific version of fcli:
The potential benifits of this would be:
Potential pitfalls:
Examples of other projects offering this method of installation:
The text was updated successfully, but these errors were encountered: