The problem
Internal codegen - OpenAPI clients, CRUD scaffolds, config generators - rots when someone hand-edits the output. Teams want a CLI that reads a schema and writes files, with CI that fails when someone forgot to regenerate.
Why Ecko
- Deterministic first
matchon AST-shaped data for the mechanical 95%. Commit the generator; diff the output in CI.- AI for irregular inputs
- When a schema entry has prose descriptions or legacy quirks, send only that fragment
to
aiwith a typed struct output. - ecko fmt --check
- Generated Ecko is formatted the same way as hand-written code. CI rejects unformatted output.
In practice
match schema.kind {
"crud" => emit_crud(schema)
_ => ai "Generate handler" from json_encode(schema)
}
Try it on your workload.