Skip to main content
Version: Next

kcl mod pull

Pull a package from the kcl mod registry.

Usage

kcl mod pull [options][package_source]

Description

kcl mod pull will pull a package from the kcl mod registry.

options

--tag

The tag of the package to pull.

--help, -h

Show help for kcl mod push command.

Examples

pull the package by package name

You can use kcl mod pull to download a kcl package from the default OCI registry by kcl package name. kpm will download the kcl package from the default OCI registry specified in the configuration file kpm.json.

kcl mod pull <package_name>:<package_version>

pull the package by oci url

You can download a kcl package from an OCI-based registry url.

kcl mod pull --tag <kcl_package_version> <oci_url>

Reference

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)