Skip to main content
Version: 0.5.5

kpm add

Add a dependency to a kcl package.

Usage

kpm add [options][package_reference]

Description

kpm add will add a dependency to a kcl package. The dependency can be from a git repository, or a kcl registry.

package_reference is a kcl package reference, looks like package_name:version.

options

--git

Specify the git url of the dependency from a git repository.

--tag

Specify the tag of the dependency from a git repository.

--help, -h

Show help for kpm add command.

Examples

Add a dependency from kcl registry

Add kcl dependency named k8s to the current package.The version of the dependency will be the latest version.

kpm add k8s

Add kcl dependency named 'k8s' with version 'v1.27.2'.

kpm add k8s:v1.27.2

Add a dependency from git repository

Add kcl dependency named konfig with version v0.1.0 from git repository.

kpm add --git https://github.com/awesome-kusion/konfig.git --tag v0.1.0