Skip to main content
Version: Next

kpm init

Init a kcl package.

Usage

kpm init [options][package_name]

Description

kpm init will initialize a kcl package in the current directory. If the package name is not provided, the name of the current directory will be used.

If the package name is provided, a subdirectory with the name of the package will be created and the package will be initialized in that directory.

kpm init will create kcl.mod, kcl.mod.lock and main.k under the package directory.

Options

--help, -h

Show help for kpm init command.

Examples

Init the current directory into a kcl package

# create an empty directory
$ mkdir my_package

# cd into the directory
$ cd my_package

# init the current directory into a kcl package
$ kpm init

Init a kcl package with a name

# init a kcl package with a name 'my_package'
kpm init my_package