github.com/KusionStack/kpm@v0.8.4-0.20240326033734-dc72298a30e5/docs/command-reference/5.run.md (about)

     1  # kpm run
     2  
     3  Compile a kcl package.
     4  
     5  ## Usage
     6  
     7  ```shell
     8  kpm run [options][package_source]
     9  ```
    10  
    11  ## Description
    12  
    13  `kpm run` will compile a kcl package.
    14  
    15  ## options
    16  
    17  ### --input
    18  
    19  Specify the entry file path of the package.
    20  
    21  ### --tag
    22  
    23  Specify the tag of the package specified by oci url `package_source`.
    24  
    25  ### --vendor
    26  
    27  `--vendor` will move the dependency packages into the current packages and automatically download the missing dependency packages.
    28  
    29  ### --kcl_args
    30  
    31  `--kcl_args` specifies the arguments passed to the kcl compiler.
    32  
    33  ### --help, -h
    34  
    35  Show help for `kpm run` command.
    36  
    37  ## Examples
    38  
    39  ### compile the current kcl package
    40  
    41  Under the kcl package directory, `kpm run` can be used to compile the current kcl package.
    42  
    43  ```shell
    44  kpm run
    45  ```
    46  
    47  ### compile a kcl package tar file
    48  
    49  `kpm run` can be used to compile a kcl package tar file.
    50  
    51  ```shell
    52  kpm run /Users/demo/my_package.tar
    53  ```
    54  
    55  ### compile a kcl package from oci reference
    56  
    57  `kpm run` can be used to compile a kcl package from oci reference.
    58  
    59  ```shell
    60  kpm run test/my_package:0.0.1
    61  ```
    62  
    63  ### compile a kcl package from oci url
    64  
    65  `kpm run` can be used to compile a kcl package from oci url.
    66  
    67  ```shell
    68  kpm run --tag 0.0.1 oci://localhost:5001/test/my_package
    69  ```