Commit 59ba3ff
committed
Add codegen-llm: LLM-based Pydantic type generation from River TypeScript servers
TypeScript CLI tool that uses the Codex SDK to generate clean, well-structured
Pydantic v2 models from a River TypeScript server's source code. Instead of the
current mechanical codegen that produces awful names and duplicated types, this
points a Codex agent at the TypeScript source so it can read how types are named
and organised, then generates matching Python models.
Key features:
- Reads TypeScript TypeBox definitions to mirror naming and composition
- Generates shared/reusable types (common errors, domain types)
- Verifies correctness by comparing generated JSON schemas against the
serialised River schema (via a Python verification script)
- Iterates on failures: feeds verification errors back to the model
- Exposed as a CLI for GitHub Actions integration
Usage:
codegen-llm generate \
--server-src ./path/to/ts/services \
--schema ./schema.json \
--output ./generated \
--client-name MyClient1 parent bd88e45 commit 59ba3ff
File tree
11 files changed
+2656
-0
lines changed- codegen-llm
- bin
- src
11 files changed
+2656
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments