ksp generate
DocsCLIksp generate

ksp generate

Command Reference

Generate protocol stubs, schema validators, or certificate structures from KSP definitions.

Core & Lifecycle

Purpose

Generate protocol stubs, schema validators, or certificate structures from KSP definitions.

Syntax

Command-line specification
bash / powershell
ksp generate <TARGET> [OPTIONS]

Arguments

ArgumentDescription
<TARGET>Generation target: `stubs`, `certs`, `schema`, or `config`.

Options & Flags

Option FlagDescription
--out <PATH>Destination file path or directory for generated artifacts.
--lang <LANG>Target programming language for generated client/server stubs.

Example Usage

Example command
ksp generate stubs --lang typescript --out ./src/ksp/

Expected Output

  [+] Parsing KSP schema definitions...
  [+] Generating TypeScript interface bindings...
  [+] Wrote 14 stream interfaces to ./src/ksp/types.ts
  [+] Wrote async stream client to ./src/ksp/client.ts

  ✔ Generation complete (42 ms).
Implementation Notes

Ensures type safety across client and server boundaries by emitting strongly typed frame serialization and deserialization helpers.