Commands
Section titled “Commands”pbkit generate
Section titled “pbkit generate”Generate types and SDK from your pbkit.config.ts.
bunx pbkit generateOptions
Section titled “Options”| Flag | Short | Description |
|---|---|---|
--config <path> | -c | Path to a config file (defaults to auto-detection) |
--watch | -w | Watch mode — regenerates every 10 seconds |
--help | -h | Show help message |
Config auto-detection
Section titled “Config auto-detection”pbkit searches for a config file in the current working directory in this order:
pbkit.config.tspbkit.config.jspbkit.config.mjs
Watch mode
Section titled “Watch mode”bunx pbkit generate --watchIn watch mode, pbkit polls the API (or re-reads the file) every 10 seconds and regenerates if the schema has changed. Press Ctrl+C to stop.
Custom config path
Section titled “Custom config path”bunx pbkit generate --config ./configs/pbkit.config.tsExit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Success |
1 | Error (config not found, API error, invalid config) |
Example output
Section titled “Example output”$ bunx pbkit generate src/generated/types.gen.ts src/generated/client.gen.ts src/generated/sdk.gen.tsGenerated 3 file(s) in 120ms