From 36c3b55ef5f0cdc868658d9d1ccad00034a8fe42 Mon Sep 17 00:00:00 2001 From: peefy Date: Fri, 5 Jul 2024 15:04:04 +0800 Subject: [PATCH] docs: update cli 0.9 reference docs Signed-off-by: peefy --- docs/tools/cli/kcl/docgen.md | 3 ++ docs/tools/cli/kcl/import.md | 5 +- docs/tools/cli/kcl/run.md | 3 ++ .../command-reference/1.init.md | 27 ++++++++++ .../command-reference/11.update.md | 23 +++++++++ .../command-reference/12.graph.md | 20 ++++++++ .../command-reference/2.add.md | 51 ++++++++++++++++++- .../command-reference/3.pkg.md | 27 ++++++++++ .../command-reference/4.metadata.md | 27 ++++++++++ .../command-reference/6.login.md | 28 ++++++++++ .../command-reference/7.logout.md | 20 ++++++++ .../command-reference/8.push.md | 24 +++++++++ .../command-reference/9.pull.md | 39 ++++++++++++++ .../current/tools/cli/kcl/docgen.md | 3 ++ .../current/tools/cli/kcl/import.md | 5 +- .../current/tools/cli/kcl/run.md | 3 ++ .../command-reference/1.init.md | 27 ++++++++++ .../command-reference/11.update.md | 23 +++++++++ .../command-reference/12.graph.md | 20 ++++++++ .../command-reference/2.add.md | 47 +++++++++++++++++ .../command-reference/3.pkg.md | 27 ++++++++++ .../command-reference/4.metadata.md | 27 ++++++++++ .../command-reference/6.login.md | 28 ++++++++++ .../command-reference/7.logout.md | 20 ++++++++ .../command-reference/8.push.md | 24 +++++++++ .../command-reference/9.pull.md | 39 ++++++++++++++ 26 files changed, 586 insertions(+), 4 deletions(-) diff --git a/docs/tools/cli/kcl/docgen.md b/docs/tools/cli/kcl/docgen.md index 63465336f..376a76284 100644 --- a/docs/tools/cli/kcl/docgen.md +++ b/docs/tools/cli/kcl/docgen.md @@ -137,6 +137,9 @@ Examples: # Generate Markdown document for current package kcl doc generate + # Generate Markdown document for current package and escape the HTML symbols | to \|, \n to
, etc. + kcl doc generate --escape-html + # Generate Html document for current package kcl doc generate --format html diff --git a/docs/tools/cli/kcl/import.md b/docs/tools/cli/kcl/import.md index fd30a7198..cb1892a22 100644 --- a/docs/tools/cli/kcl/import.md +++ b/docs/tools/cli/kcl/import.md @@ -16,6 +16,7 @@ This command converts other formats to KCL file. Supported conversion modes: - json: convert JSON data to KCL data - yaml: convert YAML data to KCL data +- toml: convert TOML data to KCL data - gostruct: convert Go struct to KCL schema - jsonschema: convert JSON schema to KCL schema - terraformschema: convert Terraform schema to KCL schema @@ -39,6 +40,9 @@ Examples: # Generate KCL models from YAML kcl import data.yaml + # Generate KCL models from TOML + kcl import data.toml + # Generate KCL models from JSON Schema kcl import -m jsonschema schema.json @@ -48,7 +52,6 @@ Examples: # Generate KCL models from Go structs kcl import -m gostruct schema.go - Flags: -f, --force Force overwrite output file -h, --help help for import diff --git a/docs/tools/cli/kcl/run.md b/docs/tools/cli/kcl/run.md index ab0e14974..3880c5042 100644 --- a/docs/tools/cli/kcl/run.md +++ b/docs/tools/cli/kcl/run.md @@ -26,6 +26,9 @@ Examples: # Run a single file and output JSON kcl run path/to/kcl.k --format json + # Run a single file and output TOML + kcl run path/to/kcl.k --format toml + # Run multiple files kcl run path/to/kcl1.k path/to/kcl2.k diff --git a/docs/tools/cli/package-management/command-reference/1.init.md b/docs/tools/cli/package-management/command-reference/1.init.md index 205e01c79..59675f7fb 100644 --- a/docs/tools/cli/package-management/command-reference/1.init.md +++ b/docs/tools/cli/package-management/command-reference/1.init.md @@ -43,3 +43,30 @@ kcl mod init # init a kcl package with a name 'my_package' kcl mod init my_package ``` + +## Reference + +```shell +This command initializes new kcl module in current directory. + +Usage: + kcl mod init [flags] + +Examples: + kcl mod init [arguments]... + # Init one kcl module with the current folder name + kcl mod init + + # Init one kcl module with the name + kcl mod init package-name + + # Init one kcl module with the name and version + kcl mod init package-name --version 0.1.0 + +Flags: + -h, --help help for init + --version string init module version + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/11.update.md b/docs/tools/cli/package-management/command-reference/11.update.md index 7b64ca812..efb9da0e5 100644 --- a/docs/tools/cli/package-management/command-reference/11.update.md +++ b/docs/tools/cli/package-management/command-reference/11.update.md @@ -33,3 +33,26 @@ kcl mod update ```shell kcl mod update path/to/package ``` + +## Reference + +```shell +This command updates dependencies listed in kcl.mod.lock based on kcl.mod. + +Usage: + kcl mod update [flags] + +Examples: + # Update the current module + kcl mod update + + # Update the module with the specified path + kcl mod update path/to/package + +Flags: + -h, --help help for update + --no_sum_check do not check the checksum of the package and update kcl.mod.lock + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/12.graph.md b/docs/tools/cli/package-management/command-reference/12.graph.md index 70c9047ca..b2b14ef53 100644 --- a/docs/tools/cli/package-management/command-reference/12.graph.md +++ b/docs/tools/cli/package-management/command-reference/12.graph.md @@ -25,3 +25,23 @@ Show help for `kcl mod graph` command. ```shell kcl mod graph ``` + +## Reference + +```shell +This command prints the module dependency graph. +Each module is identified as a string of the form path@version. + +Usage: + kcl mod graph [flags] + +Examples: + # Print the current module dependency graph. + kcl mod graph + +Flags: + -h, --help help for graph + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/2.add.md b/docs/tools/cli/package-management/command-reference/2.add.md index 1ba04fd9b..fc13c654a 100644 --- a/docs/tools/cli/package-management/command-reference/2.add.md +++ b/docs/tools/cli/package-management/command-reference/2.add.md @@ -46,8 +46,55 @@ kcl mod add k8s:1.29 ### Add a dependency from git repository -Add kcl dependency named `konfig` with version `v0.1.0` from git repository. +Add kcl dependency named `konfig` with version `v0.4.0` from git repository. ```shell -kcl mod add --git https://github.com/awesome-kusion/konfig.git --tag v0.1.0 +kcl mod add --git https://github.com/kcl-lang/konfig.git --tag v0.4.0 +``` + +## Reference + +```shell +This command adds new dependency + +Usage: + kcl mod add [flags] + +Examples: + # Add the module dependency named "k8s" + kcl mod add k8s + + # Add the module dependency named "k8s" with the version "1.28" + kcl mod add k8s:1.28 + + # Add the module dependency from the GitHub by git url + kcl mod add git://github.com/kcl-lang/konfig --tag v0.4.0 + + # Add the module dependency from the OCI Registry by oci url + kcl mod add oci://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Add the module dependency from the local file system by file url + kcl mod add /path/to/another_module + + # Add the module dependency from the GitHub by flag + kcl mod add --git https://github.com/kcl-lang/konfig --tag v0.4.0 + + # Add the module dependency from the OCI Registry by flag + kcl mod add --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Add a local dependency by flag + kcl mod add --path /path/to/another_module + +Flags: + --branch string git repository branch + --commit string git repository commit + --git string git repository url + -h, --help help for add + --no_sum_check do not check the checksum of the package and update kcl.mod.lock + --oci string oci repository url + --rename string rename the dependency + --tag string git or oci repository tag + +Global Flags: + -q, --quiet Set the quiet mode (no output) ``` diff --git a/docs/tools/cli/package-management/command-reference/3.pkg.md b/docs/tools/cli/package-management/command-reference/3.pkg.md index a2151fb3a..f273aa22e 100644 --- a/docs/tools/cli/package-management/command-reference/3.pkg.md +++ b/docs/tools/cli/package-management/command-reference/3.pkg.md @@ -31,3 +31,30 @@ Show help for `kcl mod pkm` command. ```shell kcl mod pkg --target /Users/my_package_tar ``` + +## Reference + +```shell +This command converts a kcl module into tar + +Usage: + kcl mod pkg [flags] + +Examples: + # Package the current module + kcl mod pkg + + # Package the current module in the vendor mode + kcl mod pkg --vendor + + # Package the current module into the target directory + kcl mod pkg --target /path/to/target_dir + +Flags: + -h, --help help for pkg + --target string packaged target path + --vendor package in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/4.metadata.md b/docs/tools/cli/package-management/command-reference/4.metadata.md index 8404ce36b..d29ee2dfb 100644 --- a/docs/tools/cli/package-management/command-reference/4.metadata.md +++ b/docs/tools/cli/package-management/command-reference/4.metadata.md @@ -39,3 +39,30 @@ Print the metadata of a kcl package and automatically download the missing depen ```shell kcl mod metadata --update ``` + +## Reference + +```shell +This command outputs the resolved dependencies of a package + +Usage: + kcl mod metadata [flags] + +Examples: + # Output the resolved dependencies the current module + kcl mod metadata + + # Output the resolved dependencies the current module in the vendor mode + kcl mod metadata --vendor + + # Output the resolved dependencies the current module with the update check + kcl mod metadata --update + +Flags: + -h, --help help for metadata + --update check the local package and update and download the local package. (default: false) + --vendor run in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/6.login.md b/docs/tools/cli/package-management/command-reference/6.login.md index d1e489603..c2f6cda38 100644 --- a/docs/tools/cli/package-management/command-reference/6.login.md +++ b/docs/tools/cli/package-management/command-reference/6.login.md @@ -66,3 +66,31 @@ Username: Password: Login succeeded ``` + +## Reference + +```shell +This command can be used to login to a registry. + +Usage: + kcl registry login [flags] + +Examples: + # Login the docker hub + kcl registry login docker.io + + # Login the GitHub container registry + kcl registry login ghcr.io + + # Login a localhost registry + kcl registry login https://localhost:5001 + + +Flags: + -h, --help help for login + -p, --password string registry password or identity token + -u, --username string registry username + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/7.logout.md b/docs/tools/cli/package-management/command-reference/7.logout.md index e2774ffbf..b20e580d4 100644 --- a/docs/tools/cli/package-management/command-reference/7.logout.md +++ b/docs/tools/cli/package-management/command-reference/7.logout.md @@ -25,3 +25,23 @@ Show help for `kcl registry logout` command. ```shell kcl registry logout ``` + +## Reference + +```shell +This command can be used to logout from the current registry. + +Usage: + kcl registry logout [flags] + +Examples: + # Logout the registry + kcl registry logout docker.io + + +Flags: + -h, --help help for logout + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/8.push.md b/docs/tools/cli/package-management/command-reference/8.push.md index 2bf58f3a9..2789bc1a6 100644 --- a/docs/tools/cli/package-management/command-reference/8.push.md +++ b/docs/tools/cli/package-management/command-reference/8.push.md @@ -44,3 +44,27 @@ You can also use `kcl mod push` to upload a tar file to an OCI-based registry. ```shell kcl mod push --tar_path ``` + +## Reference + +```shell +This command pushes kcl modules to the registry. + +Usage: + kcl mod push [flags] + +Examples: + # Push the current module to the registry + kcl mod push + + # Push the current module to the registry in the vendor mode + kcl mod push --vendor + +Flags: + -h, --help help for push + --tar_path string packaged target path that will be pushed + --vendor run in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/docs/tools/cli/package-management/command-reference/9.pull.md b/docs/tools/cli/package-management/command-reference/9.pull.md index 9518fcbfd..6e491a601 100644 --- a/docs/tools/cli/package-management/command-reference/9.pull.md +++ b/docs/tools/cli/package-management/command-reference/9.pull.md @@ -40,3 +40,42 @@ You can download a kcl package from an OCI-based registry url. ```shell kcl mod pull --tag ``` + +## Reference + +```shell +This command pulls kcl modules from the registry. + +Usage: + kcl mod pull [flags] + +Examples: + # Pull the the module named "k8s" to the local path from the registry + kcl mod pull k8s + + # Pull the module dependency named "k8s" with the version "1.28" + kcl mod pull k8s:1.28 + + # Pull the module from the GitHub by git url + kcl mod pull git://github.com/kcl-lang/konfig --tag v0.4.0 + + # Pull the module from the OCI Registry by oci url + kcl mod pull oci://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Pull the module from the GitHub by flag + kcl mod pull --git https://github.com/kcl-lang/konfig --tag v0.4.0 + + # Pull the module from the OCI Registry by flag + kcl mod pull --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + +Flags: + --branch string git repository branch + --commit string git repository commit + --git string git repository url + -h, --help help for pull + --oci string oci repository url + --tag string git or oci repository tag + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/docgen.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/docgen.md index d2ba6531c..9aa3e9857 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/docgen.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/docgen.md @@ -137,6 +137,9 @@ Examples: # Generate Markdown document for current package kcl doc generate + # Generate Markdown document for current package and escape the HTML symbols | to \|, \n to
, etc. + kcl doc generate --escape-html + # Generate Html document for current package kcl doc generate --format html diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/import.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/import.md index 1669e2603..81af8837e 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/import.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/import.md @@ -16,6 +16,7 @@ This command converts other formats to KCL file. Supported conversion modes: - json: convert JSON data to KCL data - yaml: convert YAML data to KCL data +- toml: convert TOML data to KCL data - gostruct: convert Go struct to KCL schema - jsonschema: convert JSON schema to KCL schema - terraformschema: convert Terraform schema to KCL schema @@ -39,6 +40,9 @@ Examples: # Generate KCL models from YAML kcl import data.yaml + # Generate KCL models from TOML + kcl import data.toml + # Generate KCL models from JSON Schema kcl import -m jsonschema schema.json @@ -48,7 +52,6 @@ Examples: # Generate KCL models from Go structs kcl import -m gostruct schema.go - Flags: -f, --force Force overwrite output file -h, --help help for import diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/run.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/run.md index 6d44872bb..a3b86be69 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/run.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/kcl/run.md @@ -24,6 +24,9 @@ Examples: # Run a single file and output JSON kcl run path/to/kcl.k --format json + # Run a single file and output TOML + kcl run path/to/kcl.k --format toml + # Run multiple files kcl run path/to/kcl1.k path/to/kcl2.k diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/1.init.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/1.init.md index b3995f6ae..e53625787 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/1.init.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/1.init.md @@ -43,3 +43,30 @@ kcl mod init # 初始化一个名为 my_package 的 kcl 包 kcl mod init my_package ``` + +## 命令参考 + +```shell +This command initializes new kcl module in current directory. + +Usage: + kcl mod init [flags] + +Examples: + kcl mod init [arguments]... + # Init one kcl module with the current folder name + kcl mod init + + # Init one kcl module with the name + kcl mod init package-name + + # Init one kcl module with the name and version + kcl mod init package-name --version 0.1.0 + +Flags: + -h, --help help for init + --version string init module version + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/11.update.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/11.update.md index 67073d064..182836001 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/11.update.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/11.update.md @@ -21,3 +21,26 @@ kcl mod update ```shell kcl mod update path/to/package ``` + +## 命令参数 + +```shell +This command updates dependencies listed in kcl.mod.lock based on kcl.mod. + +Usage: + kcl mod update [flags] + +Examples: + # Update the current module + kcl mod update + + # Update the module with the specified path + kcl mod update path/to/package + +Flags: + -h, --help help for update + --no_sum_check do not check the checksum of the package and update kcl.mod.lock + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/12.graph.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/12.graph.md index ed015e6bf..9aabd2178 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/12.graph.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/12.graph.md @@ -15,3 +15,23 @@ kcl mod graph [flags] ```shell kcl mod graph ``` + +## 命令参数 + +```shell +This command prints the module dependency graph. +Each module is identified as a string of the form path@version. + +Usage: + kcl mod graph [flags] + +Examples: + # Print the current module dependency graph. + kcl mod graph + +Flags: + -h, --help help for graph + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/2.add.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/2.add.md index 982fa714d..ee9f5805b 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/2.add.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/2.add.md @@ -51,3 +51,50 @@ kcl mod add k8s:1.29 ```shell kcl mod add --git https://github.com/awesome-kusion/konfig.git --tag v0.1.0 ``` + +## 命令参考 + +```shell +This command adds new dependency + +Usage: + kcl mod add [flags] + +Examples: + # Add the module dependency named "k8s" + kcl mod add k8s + + # Add the module dependency named "k8s" with the version "1.28" + kcl mod add k8s:1.28 + + # Add the module dependency from the GitHub by git url + kcl mod add git://github.com/kcl-lang/konfig --tag v0.4.0 + + # Add the module dependency from the OCI Registry by oci url + kcl mod add oci://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Add the module dependency from the local file system by file url + kcl mod add /path/to/another_module + + # Add the module dependency from the GitHub by flag + kcl mod add --git https://github.com/kcl-lang/konfig --tag v0.4.0 + + # Add the module dependency from the OCI Registry by flag + kcl mod add --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Add a local dependency by flag + kcl mod add --path /path/to/another_module + +Flags: + --branch string git repository branch + --commit string git repository commit + --git string git repository url + -h, --help help for add + --no_sum_check do not check the checksum of the package and update kcl.mod.lock + --oci string oci repository url + --rename string rename the dependency + --tag string git or oci repository tag + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/3.pkg.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/3.pkg.md index a9c65154f..e9138fe13 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/3.pkg.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/3.pkg.md @@ -31,3 +31,30 @@ kcl mod pkg [options] ```shell kcl mod pkg --target /Users/my_package_tar ``` + +## 命令参数 + +```shell +This command converts a kcl module into tar + +Usage: + kcl mod pkg [flags] + +Examples: + # Package the current module + kcl mod pkg + + # Package the current module in the vendor mode + kcl mod pkg --vendor + + # Package the current module into the target directory + kcl mod pkg --target /path/to/target_dir + +Flags: + -h, --help help for pkg + --target string packaged target path + --vendor package in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/4.metadata.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/4.metadata.md index 66fa3979b..dd6aa7830 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/4.metadata.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/4.metadata.md @@ -39,3 +39,30 @@ kcl mod metadata ```shell kcl mod metadata --update ``` + +## 命令参数 + +```shell +This command outputs the resolved dependencies of a package + +Usage: + kcl mod metadata [flags] + +Examples: + # Output the resolved dependencies the current module + kcl mod metadata + + # Output the resolved dependencies the current module in the vendor mode + kcl mod metadata --vendor + + # Output the resolved dependencies the current module with the update check + kcl mod metadata --update + +Flags: + -h, --help help for metadata + --update check the local package and update and download the local package. (default: false) + --vendor run in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/6.login.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/6.login.md index 5ab67de49..0bf1677ad 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/6.login.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/6.login.md @@ -66,3 +66,31 @@ Username: Password: Login succeeded ``` + +## 命令参数 + +```shell +This command can be used to login to a registry. + +Usage: + kcl registry login [flags] + +Examples: + # Login the docker hub + kcl registry login docker.io + + # Login the GitHub container registry + kcl registry login ghcr.io + + # Login a localhost registry + kcl registry login https://localhost:5001 + + +Flags: + -h, --help help for login + -p, --password string registry password or identity token + -u, --username string registry username + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/7.logout.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/7.logout.md index 6cab97796..01c9efebc 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/7.logout.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/7.logout.md @@ -25,3 +25,23 @@ kcl registry logout [options][kpm_registry] ```shell kcl registry logout ``` + +## 命令参数 + +```shell +This command can be used to logout from the current registry. + +Usage: + kcl registry logout [flags] + +Examples: + # Logout the registry + kcl registry logout docker.io + + +Flags: + -h, --help help for logout + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/8.push.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/8.push.md index c2ff6d9ed..b3ee66367 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/8.push.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/8.push.md @@ -44,3 +44,27 @@ kcl mod push ```shell kcl mod push --tar_path ``` + +## 命令参数 + +```shell +This command pushes kcl modules to the registry. + +Usage: + kcl mod push [flags] + +Examples: + # Push the current module to the registry + kcl mod push + + # Push the current module to the registry in the vendor mode + kcl mod push --vendor + +Flags: + -h, --help help for push + --tar_path string packaged target path that will be pushed + --vendor run in vendor mode (default: false) + +Global Flags: + -q, --quiet Set the quiet mode (no output) +``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/9.pull.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/9.pull.md index 1eb7cc15e..c0b049b7f 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/9.pull.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/tools/cli/package-management/command-reference/9.pull.md @@ -39,3 +39,42 @@ kcl mod pull : ```shell kcl mod pull --tag ``` + +## 命令参数 + +```shell +This command pulls kcl modules from the registry. + +Usage: + kcl mod pull [flags] + +Examples: + # Pull the the module named "k8s" to the local path from the registry + kcl mod pull k8s + + # Pull the module dependency named "k8s" with the version "1.28" + kcl mod pull k8s:1.28 + + # Pull the module from the GitHub by git url + kcl mod pull git://github.com/kcl-lang/konfig --tag v0.4.0 + + # Pull the module from the OCI Registry by oci url + kcl mod pull oci://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + + # Pull the module from the GitHub by flag + kcl mod pull --git https://github.com/kcl-lang/konfig --tag v0.4.0 + + # Pull the module from the OCI Registry by flag + kcl mod pull --oci https://ghcr.io/kcl-lang/helloworld --tag 0.1.0 + +Flags: + --branch string git repository branch + --commit string git repository commit + --git string git repository url + -h, --help help for pull + --oci string oci repository url + --tag string git or oci repository tag + +Global Flags: + -q, --quiet Set the quiet mode (no output) +```