baobao-codegen-typescript
TypeScript code generator for Bao CLI generator.
This crate generates TypeScript CLI applications using boune, a CLI library targeting Bun runtime.
Usage
This crate is used internally by the baobao CLI tool. You typically don't need to use it directly.
use Generator;
use LanguageCodegen;
use Manifest;
use Path;
let manifest = from_file?;
let generator = new;
// Preview files without writing
let files = generator.preview;
// Generate files to disk
let result = generator.generate?;
Generated Output
The generator produces a TypeScript CLI project:
output/
├── src/
│ ├── cli.ts # Main CLI setup with boune
│ ├── context.ts # Shared context (database pools, HTTP clients)
│ ├── index.ts # Entry point
│ ├── commands/ # Command definitions
│ │ └── *.ts
│ └── handlers/ # Handler stubs for implementation
│ └── *.ts
├── package.json
├── tsconfig.json
├── bao.toml
└── .gitignore
License
This project is licensed under the MIT license.