kcl-lang.io/kpm@v0.8.7-0.20240520061008-9fc4c5efc8c7/docs/command-reference/9.pull.md (about)

     1  # kpm pull
     2  
     3  Pull a package from the kpm registry.
     4  
     5  ## Usage
     6  
     7  ```shell
     8  kpm pull [options][package_source]
     9  ```
    10  
    11  ## Description
    12  
    13  `kpm pull` will pull a package from the kpm registry.
    14  
    15  ## options
    16  
    17  ### --tag
    18  
    19  The tag of the package to pull.
    20  
    21  ### --help, -h
    22  
    23  Show help for `kpm push` command.
    24  
    25  ## Examples
    26  
    27  ### pull the package by package name
    28  
    29  You can use `kpm pull` to download a kcl package from the default OCI registry by kcl package name.
    30  `kpm` will download the kcl package from the default OCI registry specified in the configuration file `kpm.json`.
    31  
    32  ```shell
    33  kpm pull <package_name>:<package_version>
    34  ```
    35  
    36  ### pull the package by oci url
    37  
    38  You can download a kcl package from an OCI-based registry url.
    39  
    40  ```shell
    41  kpm pull --tag <kcl_package_version> <oci_url>
    42  ```