ksp generate
ksp generate
Command ReferenceGenerate 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 specificationbash / powershell
ksp generate <TARGET> [OPTIONS]
Arguments
| Argument | Description |
|---|---|
| <TARGET> | Generation target: `stubs`, `certs`, `schema`, or `config`. |
Options & Flags
| Option Flag | Description |
|---|---|
| --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.