Create a Package

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

Note

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.

sh

Copy
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.

YAML

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

Important

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.

Note

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

bash

Copy
kxi package init --help

console

Copy
 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.                               │
╰──────────────────────────────────────────────────────────────────────────────╯

Note

User-defined custom fields are not allowed.

Next steps

Manage deployment components