github.com/KusionStack/kpm@v0.8.4-0.20240326033734-dc72298a30e5/docs/command-reference/8.push.md (about) 1 # kpm push 2 3 Push a package to the kpm registry. 4 5 ## Usage 6 7 ```shell 8 kpm push [options][kpm_registry] 9 ``` 10 11 ## Description 12 13 `kpm push` will push a package to the kpm registry. 14 15 ## options 16 17 ### --tar_path 18 19 The path to the tar file to push. 20 21 ### --help, -h 22 23 Show help for `kpm push` command. 24 25 ## Examples 26 27 ### push the current package 28 29 You can use `kpm push` under the kcl package root directory to upload a kcl package to an OCI-based registry. 30 31 ```shell 32 # create a new kcl package. 33 $ kpm init <package_name> 34 # enter the kcl package root directory 35 $ cd <package_name> 36 # push it to an oci registry 37 $ kpm push <oci_url> 38 ``` 39 40 ### push a tar to the registry 41 42 You can also use `kpm push` to upload a tar file to an OCI-based registry. 43 44 ```shell 45 kpm push --tar_path <tar_path> <oci_url> 46 ```