Skip to content

kcl-lang/kcl-js

Repository files navigation

KCL Javascript/Typescript SDK

Synchronized from the repo: https://github.com/kcl-lang/lib/tree/main/nodejs

Installation

npm install kcl-lib

Quick Start

import { execProgram, ExecProgramArgs } from "kcl-lib";

function main() {
  const result = execProgram(new ExecProgramArgs(["schema.k"]));
  console.log(result.yamlResult);
}

main();

Developing

  • Install node.js and pnpm
  • Install cargo (for Rust code)
  • Install dependencies
pnpm install

Building

pnpm build

Testing

pnpm test

Format

pnpm format