A Nushell plugin to use with KCL CLI wrapper
Caution
Require to have KCL CLI wrapper use KLC installation documentation
Clone this repository
Warning
nu_plugin_kcl has dependencies to nushell source via local path in Cargo.toml Nushell and plugins require to be sync with same version
Clone Nushell to plugin to use Tera templates or change dependecies in Cargo.toml
This plugin is also included as submodule in nushell-plugins as part of plugins collection for Provisioning project
Is used in
Build from source
> cd nu_plugin_tcl
> cargo install --path .In a Nushell
> plugin add ~/.cargo/bin/nu_plugin_kclExec 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)
Execute the KCL file './src/myfile.k'
> kcl-exec ./src/myfile.kValidate KCL files
> kcl-validate (dir)Flags: -h, --help: Display the help message for this command
Parameters:
- dir : Directory to validate (optional)
Validate all KCL files in the directory './project_dir'.
> kcl-validate ./project_dir
✅ All 3 files are valid
✅ ./project_dir/main.kFormat KCL files
> kcl-format (dir)Flags:
- -h, --help: Display the help message for this command
Parameters:
- file : KCL file to format
Format the KCL file 'myfile.k'.
> kcl-format myfile.k
✅ File formatted: myfile.k