Dosu LogoDosu Logo
Ask
Join our Discord
Organization avatar
kptPublic
kpt
Documentskpt
_index
_index
Type
External
Status
Published
Created
Feb 19, 2026
Updated
Jul 21, 2026
Updated by
Dosu Bot
Source
documentation/content/en/reference/cli/live/init/_index.md

init initializes the package with the name, namespace and id of the resource
that will keep track of the package inventory.

Synopsis#

kpt live init [PKG_PATH] [flags]

Args#

PKG_PATH:
  Path to the local package which should be updated with inventory information.
  It must contain a Kptfile. Defaults to the current working directory.

Flags#

--force:
  Forces the inventory values to be updated, even if they are already set.
  Defaults to false.

--inventory-id:
  Inventory identifier for the package. This is used to detect overlap between
  packages that might use the same name and namespace for the inventory object.
  Defaults to an auto-generated value.

--name:
  The name for the ResourceGroup resource that contains the inventory
  for the package. Defaults to the name of the package.

--namespace:
  The namespace for the ResourceGroup resource that contains the inventory
  for the package. If not provided, kpt will check if all the resources
  in the package belong in the same namespace. If they do, that namespace will
  be used. If they do not, the namespace in the user's context will be chosen.

--quiet:
  If true, do not print output message for initialization. Defaults to false.

--rg-file:
  The name used for the file created for the ResourceGroup CR. Defaults to
  'resourcegroup.yaml'.

Examples#

# initialize a package in the current directory.
$ kpt live init
# initialize a package with explicit namespace for the ResourceGroup.
$ kpt live init --namespace=test my-dir
Documents
CLI Architecture
_index
migration
tenant-onboarding
Function Runtime Permissions and Mounts
_index
_index
_index
_index
_index
migration
Helm Chart Rendering
Homebrew Formula Management
KRM Function Resource Transformation
_index
_index
_index
_index
_index
migration
rationale
value-propagation
PackageRevision Lifecycle
tenant-onboarding
Release Version Management
_index
CONTRIBUTING
README
Repository Cache Synchronization
Subpackage Management
_index
_index
_index
_index
_index
_index
_index
migration
namespace-provisioning-cli
README
tenant-onboarding
CONTRIBUTING
README
README
README
RELEASING
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
_index
code-of-conduct
faq
kpt-cli
search
search
variant-constructor-pattern