Skip to content

pbkit command-line interface reference.

Generate types and SDK from your pbkit.config.ts.

Terminal window
bunx pbkit generate
FlagShortDescription
--config <path>-cPath to a config file (defaults to auto-detection)
--watch-wWatch mode — regenerates every 10 seconds
--help-hShow help message

pbkit searches for a config file in the current working directory in this order:

  1. pbkit.config.ts
  2. pbkit.config.js
  3. pbkit.config.mjs
Terminal window
bunx pbkit generate --watch

In 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.

Terminal window
bunx pbkit generate --config ./configs/pbkit.config.ts
CodeMeaning
0Success
1Error (config not found, API error, invalid config)
$ bunx pbkit generate
src/generated/types.gen.ts
src/generated/client.gen.ts
src/generated/sdk.gen.ts
Generated 3 file(s) in 120ms