-
Notifications
You must be signed in to change notification settings - Fork 44
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
Uniformity of kcl run and kcl mod add CLI, etc #289
Comments
Hi @Vanshikav123 😃 Welcome! You can begin with this task.
I provide some more detailed information. Currently, kpm supports OCI Registries with URLs beginning with either 'https' or 'http' protocols.
kpm requires the environment variable
The state of this switch variable restricts kpm to effect only one protocol at a time—either kpm utilizes the third-party library
Therefore, you could begin by research how the ORAS tool achieves this, and then try to implement the same functionality in kpm. If you can find the apis used by oras, using those apis directly in kpm to implement the same functionality will make it very easy to solve this problem. 😊😊😊 |
Thanks for providing me with the references will come up with a solution soon ! |
Can git://github.com be simplified to github.com and git://github.com is also allowed. Ref kubectl apply |
Uniformity of kcl mod add and kcl run CLI
1. This issue is created for
add/run/push/pull
commands to reduce user cognitive load.2. The command design
The KCL command follows the following pattern:
<op>
indicates an operation on a KCL module.<op>
of commandkcl mod add
ismod add
which means add a KCL module as dependency.<module_spec>
indicates the specification of the KCL module.<module_name>:<module_version>
.kcl mod add helloworld:0.1.2
means add a KCL module whose name ishelloworld
and version is0.1.2
as dependency.<module_source>
indicates the source of the KCL module, including the specific source address and the corresponding selected flag.kcl mod add cc:0.0.1 --git https://github.com/kcl-lang/flask-demo-kcl-manifests.git --commit 8308200
will clone the git repo with commit id and find the KCL module namedcc
with version0.0.1
and add it as dependency.Next, we will take
kcl mod add
as an example to give a more detailed case.2.1 Direct use of
https/http
We support the direct use of protocols starting with
http/https
, and use the flag to specify the module source type--oci
or--git
Taking https as an example:
2.2 Specifying using the
oci/git
protocolkpm also supports the use of specific protocols to designate the source.
Specifying the source using the
oci://
protocol:Specifying the source using the
git://
protocol:For private git repo,
ssh://
protocol is supported.3. The dependencies in
kcl.mod
For
kcl.mod
, kpm supports writing dependencies as below, takek8s
as example:3.1 OCI Registry
Specify the KCL package source is OCI Registry
version it the oci tag
3.2 Git Registry
The design before:
#266
Some examples of other tools are referenced
The text was updated successfully, but these errors were encountered: