Feature Request
Is your feature request related to a problem? Please describe:
Currently, the auto installer:
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash
always installs the latest available release tag.
This creates issues when the latest version is unavailable or broken (for example, due to CI/CD failures that result in missing or invalid release assets). In such cases, the installer still attempts to download the latest version, leading to installation failures.
Example failure:
Run curl -fsSL https://www.kcl-lang.io/script/install-cli.sh | /bin/bash
Getting the latest KCL ...
Your system is linux_amd64
Find the latest KCL version v0.12.4
Downloading https://github.com/kcl-lang/cli/releases/download/v0.12.4/kcl-v0.12.4-linux-amd64.tar.gz ...
Scucessful to download https://github.com/kcl-lang/cli/releases/download/v0.12.4/kcl-v0.12.4-linux-amd64.tar.gz
tar: This does not look like a tar archive
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Error: Failed to unpack KCL executable.
Error: Failed to install KCL
For support, go to https://kcl-lang.io/
Error: Process completed with exit code 1.
This makes the installer unreliable, especially for CI/CD environments where stability and reproducibility are required.
Describe the feature you'd like:
Add support for specifying a version in the installer via an environment variable and/or argument.
Example using environment variable:
KCL_VERSION=0.12.3
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash
Optional (if arguments are supported):
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash -s -- --version 0.12.3
Teachability, Documentation, Adoption, Migration Strategy:
This feature would allow users to:
- Pin a specific version in CI/CD pipelines for reproducible builds
- Work around broken or unavailable latest releases
- Align with common practices used by other CLI installers
The change is backward compatible, as the default behavior can remain installing the latest version when no version is specified.
Documentation could include a short section in the install guide demonstrating how to pin a version using KCL_VERSION.
Feature Request
Is your feature request related to a problem? Please describe:
Currently, the auto installer:
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bashalways installs the latest available release tag.
This creates issues when the latest version is unavailable or broken (for example, due to CI/CD failures that result in missing or invalid release assets). In such cases, the installer still attempts to download the latest version, leading to installation failures.
Example failure:
This makes the installer unreliable, especially for CI/CD environments where stability and reproducibility are required.
Describe the feature you'd like:
Add support for specifying a version in the installer via an environment variable and/or argument.
Example using environment variable:
KCL_VERSION=0.12.3 curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bashOptional (if arguments are supported):
curl -fsSL https://kcl-lang.io/script/install-cli.sh | /bin/bash -s -- --version 0.12.3Teachability, Documentation, Adoption, Migration Strategy:
This feature would allow users to:
The change is backward compatible, as the default behavior can remain installing the latest version when no version is specified.
Documentation could include a short section in the install guide demonstrating how to pin a version using KCL_VERSION.