kiln¶
Warning
kiln is in pre-alpha. APIs may change between releases.
kiln is a CLI for autogenerating files from templates. The CLI is the generic
codegen code-generation engine; kiln-generator ships four targets that
plug into it:
beFastAPI / SQLAlchemy backend code generator. Produces routes, schemas, serializers, and tests from a Jsonnet config that points at your SQLAlchemy models.
be_rootOne-shot bootstrap for a
be-driven project. Emitsmain.py,pyproject.toml,justfile, and the starterconfig/project.jsonnet.feReact / TypeScript frontend code generator. A thin wrapper over @hey-api/openapi-ts that translates a kiln-side jsonnet config into
openapi-ts.config.tsso the generated TypeScript client / React-Query hooks stay in lockstep with the same source of truth as the rest of the project.fe_rootOne-shot bootstrap for a
fe-driven project. Emitspackage.json,justfile,tsconfig.json,vite.config.ts, and asrc/skeleton wired to @fsh/components-library.
Run any target with:
codegen generate --target <name> --config <path> --out <dir>
Getting started
- Getting started
- What be generates – and doesn’t
- Prerequisites
- Install
- Fast path: bootstrap with
be_root - Project layout
- Step 1 – Define your SQLAlchemy models
- Step 2 – Write a config
- Step 3 – Generate
- Step 4 – Mount the router
- Step 5 – Environment and database
- Step 6 – Run the server
- Adding authentication
- Multi-app projects
- Where to next
- Playground
- Usage
Reference
Contributing