2025-06-26 23:52:06 +01:00
2025-06-26 23:52:06 +01:00
2025-06-26 23:51:12 +01:00
2025-06-26 23:52:06 +01:00
2025-06-26 23:52:06 +01:00
2025-06-26 23:51:44 +01:00
2025-06-26 23:51:12 +01:00

nu_plugin_kcl

A Nushell plugin to use with KCL CLI wrapper

Installing

[!TIP] Require to have KCL CLI wrapper use KLC installation documentation

Clone this repository

Build from source

> cargo install --path .

Nushell

In a Nushell

> plugin add ~/.cargo/bin/nu_plugin_kcl

Exec KCL files

Exec KCL files and return result in YAML

> kcl-exec <file> (work_dir)

Flags:

  • -h, --help: Display the help message for this command

Parameters:

  • file : KCL file to execute
  • work_dir : Work directory (optional)

Examples:

Execute the KCL file './src/myfile.k'

> kcl-exec ./src/myfile.k

Validate KCL files

Validate KCL files

> kcl-validate (dir)

Flags: -h, --help: Display the help message for this command

Parameters:

  • dir : Directory to validate (optional)

Examples

Validate all KCL files in the directory './project_dir'.

> kcl-validate ./project_dir
✅ All 3 files are valid
✅ ./project_dir/main.k

Format KCL files

Format KCL files

> kcl-format (dir)

Flags:

  • -h, --help: Display the help message for this command

Parameters:

  • file : KCL file to format

Examples

Format the KCL file 'myfile.k'.

> kcl-format myfile.k
✅ File formatted: myfile.k
Description
A Nushell plugin to use KCL CLI wrapper
Readme MIT 60 KiB
Languages
Nushell 59.8%
Rust 40.2%