Skip to content

Create a Package

This page provides the steps to create a package using the CLI.

Using the web interface or the CLI

kdb Insights Enterprise has both a web interface and command line interface (CLI). For information on how to create packages using the web interface, refer to the web interface documentation.

To create a package in kdb Insights Enterprise, run the kxi package init command, as shown below.

kxi package init packagename --force

This creates a my_packages folder. An empty package is now stored in the my_packages folder. Once the package has been initialized you can check out what is inside.

uuid: a7059c0f-f18e-4c96-8d8e-6d98bc8a8c8c
name: qpackage
version: 0.0.1
metadata:
  description: ''
  authors:
  - {}
entrypoints:
  default: init.q

This package is not yet available within kdb Insights Enterprise. You need to push the package to a kdb Insights Enterprise deployment to use it in kdb Insights Enterprise.

You can use the help command to see information on additional options.

kxi package init --help
 Usage: kxi package init [OPTIONS] [PATH_TO_PACKAGE]                            

 Creates a bare package at the specified target path.                           
 Note: this will not be saved to your KX_PACKAGE_PATH unless `install` is       
 explicitly run.                                                                

╭─ Options ────────────────────────────────────────────────────────────────────╮
│ --force            Force initialisation: overwrite existing directory if one │
│                    already exists.                                           │
│ --reset            Reset initialisation: overwrite the existing manifest     │
│                    only                                                      │
│ --version    TEXT  Version of the package to initialise.                     │
│ --help             Show this message and exit.                               │
╰──────────────────────────────────────────────────────────────────────────────╯

User-defined custom fields are not allowed.

Next steps