1 KDSL mod Command Reference

This document describes all subcommands available under kdsl mod, their usage, options, and purpose.


Usage

kdsl mod <subcommand> [options]

1.1 init

Initializes a new KDSL module in the current directory.

Usage

kdsl mod init <module-name>
  • <module-name>: The name of the new module (e.g., “example.com/my-org/module”).

Example

kdsl mod init example.com/my-org/module

1.2 update

Updates the version or the cache location of a module.

Usage

kdsl mod update [-p, --path <module-path>] [-v, --version <version>] [-c, --cache <cache-path>]
  • -p, --path <module-path>: (Optional) The path to the module to update. If omitted, updates the current module.
  • -v, --version <version>: (Optional) The new version to set for the module.
  • -c, --cache <cache-path>: (Optional) The new cache location for the module.

Example

kdsl mod update -p ./my-module -v 1.2.0 -c /new/cache/location

1.3 dependency

Manages module dependencies. You can add, remove, or list dependencies.

Usage

kdsl mod dependency <url>@<semver> [--alias <alias>] [--headers <url>@<semver>] [--download] [--remove]
  • <url>: The URL of the module repository.
  • <semver>: The semantic version of the module.
  • --alias <alias>: (Optional) An alias for the module.
  • --headers <url>@<semver>: (Optional) Specifies a separate URL and version for module headers.
  • --download: (Optional) Downloads the specified dependency.
  • --remove: (Optional) Removes the specified dependency.

Examples
Add a dependency:

  kdsl mod dep github.com/org/repo@v1.0.0

To add a dependency with an alias:

  kdsl mod dep github.com/org/repo@v1.0.0 --alias mydep

To update a dependency to a new version:

  kdsl mod dep github.com/org/repo@1.2.0

To remove a dependency:

  kdsl mod dep github.com/org/repo --remove

To add a dependency and download it immediately:

  kdsl mod dep github.com/org/repo@v1.0.0 --download

1.4 download

Downloads all module dependencies specified in the current project.

Usage

kdsl mod download [module...] [-q, --quiet]
  • module...: (Optional) A list of module URLs to download. If omitted, all dependencies will be downloaded.
  • -q, --quiet: (Optional) Suppresses output during the download process.
kdsl mod download <url1> <url2> ...

1.5 jsonschema

JSON Schema utilities for modules.

Usage

kdsl mod jsonschema <subcommand>

1.5.1 gen

Creates a new Kumori DSL module and initializes a deployment definition.

Usage

kdsl mod jsonschema gen <target> <package-path> <artifact-name> <output-module-name> <json>
  • <target>: Unique path of the kmodule where the artifact is defined. Accepts remote targets (e.g., “github.com/MyOrg/component@v1.2.3”) or local paths (e.g. “/abs/path/to/module”, “../rel/path/to/module”).
  • <package-path>: Relative path to the package that contains the artifact definition. (e.g. “internal/service”). For artifacts in the module’s root package, use “.”.
  • <artifact-name>: Name of the target artifact (e.g., “ExampleService”).
  • <output-module-name>: Name of the output module (e.g., “example.com/my-org/module”).
  • <json>: Path to the JSON file containing the schema to generate the artifact from.

Generates JSON Schema files for the module’s types. Example

kdsl mod jsonschema gen my-module ./internal/service ExampleService example.com/my-org/module ./schema.json

1.5.2 get

Extracts the JSON Schema representation for a specified module and artifact

Usage

kdsl mod jsonschema get <target> <package-path> <artifact-name>
  • <target>: Unique path of the kmodule where the artifact is defined. Accepts remote targets (e.g., “github.com/MyOrg/component@v1.2.3”) or local paths (e.g. “/abs/path/to/module”, “../rel/path/to/module”).
  • <package-path>: Relative path to the package that contains the artifact definition. (e.g. “internal/service”). For artifacts in the module’s root package, use “.”.
  • <artifact-name>: Name of the target artifact (e.g., “ExampleService”).

Example

kdsl mod jsonschema get my-module ./internal/service ExampleService

1.6 checksum

Generates and displays the checksum for the current module.

Usage

kdsl mod checksum