Code Generators
Every generator produces a single, self-contained file your agent can drop into the project. No dependency resolution. No configuration. Just working code that the compiler can verify against your implementation.
Design Principles
- Single file — One fully contained, fully functional file per generator. Drop it in and go.
- Minimal dependencies — Uses native framework dependencies. No extra libraries to manage.
- Readable output — Generated code you'd be proud to commit. Indistinguishable from hand-written.
Available Generators
T TypeScript
| Generator | Key | Description |
|---|---|---|
| TypeScript | typescript | Full client SDK with type definitions, API client, and error types |
S Scala (Play Framework)
| Generator | Key | Description |
|---|---|---|
| Play Model | bryzek_play_model | Case classes, enums, and JSON serialization |
| Play Client | bryzek_play_client | Type-safe HTTP client with models |
| Play Controller | bryzek_play_controller | Abstract controller traits for server implementation |
| Play Routes | bryzek_play_routes | Play routes file entries for each operation |
| Play Mock Model | bryzek_play_mock_model | Factory methods for generating test data |
| Play Mock Client | bryzek_play_mock_client | Mock client for testing without HTTP |
E Elm
| Generator | Key | Description |
|---|---|---|
| Elm | elm_v2 | Fully typed models, decoders, encoders, and HTTP operations |
⚙ PostgreSQL
| Generator | Key | Description |
|---|---|---|
| Scala DAO | psql_scala | Scala DAO classes with type-safe queries and CRUD operations |
| DDL | psql_ddl | PostgreSQL table definitions, indexes, and constraints |
Using Generators in .api/config
Reference generators by their key in your .api/config file,
mapping each to the output directory where generated files should be written:
myorg:
- generators:
typescript: ./src/generated
applications:
my-api:
- generators:
bryzek_play_model: generated/app/apibuilder
bryzek_play_client: generated/app/apibuilder
bryzek_play_mock_client: generated/test/apibuilder
bryzek_play_controller: generated/app/apibuilder
bryzek_play_routes: conf
applications:
my-api:Scala / Play Framework Docs
Ready to generate code?
Getting Started