Guide for new SDK contributors.
- Node.js >= 22.14.0
- pnpm 10.28.0 (see
packageManagerin rootpackage.json) - GPG key for commit signing (enforced by Lefthook post-commit hook)
git clone https://github.com/tailor-platform/sdk.git
cd sdk
pnpm install
pnpm exec turbo run build| Command | Description |
|---|---|
pnpm exec turbo run build |
Build all packages |
pnpm exec turbo run test |
Run all tests |
pnpm exec turbo run check |
Format, lint, typecheck, knip |
pnpm exec turbo run generate |
Run code generation |
In packages/sdk/:
| Command | Description |
|---|---|
pnpm test |
Run all tests |
pnpm test path/to/test.ts |
Run specific test file |
pnpm test -t "pattern" |
Run tests matching pattern |
pnpm build |
Build SDK |
pnpm docs:check |
Verify CLI docs match commands |
pnpm docs:update |
Regenerate CLI docs |
example/ is used for development testing and CI validation.
cd example
pnpm generate # Generate types
pnpm apply # Deploy to platform (requires workspace)
pnpm test # Run generator tests
pnpm test:e2e # Run E2E tests (requires deployed workspace)Lefthook runs on every commit (see lefthook.yml):
- Build — Rebuild SDK if
.tsfiles changed - Format — Check formatting with oxfmt
- Lint — Run oxlint + ESLint
- Typecheck — Run tsgo
- Knip — Detect unused dependencies and exports
Post-commit verifies GPG signature.
To customize hooks locally, create lefthook-local.yml (gitignored).