create-baml-app
v1.0.7
Published
<p align="center"> <img src="https://github.com/ashayas/create-baml-app/raw/master/.github/assets/lamb.png" width="250" alt="Create BAML App"/> </p>
Readme
Create BAML App 🐑
A CLI tool to set up a BAML project with your preferred language and package manager. BAML is the AI framework from Boundary ML that adds engineering to prompt engineering.
What is BAML? 🤔
BAML (Basically A Made-up Language) is a programming language for building AI applications. It provides:
- Type-safe structured outputs from LLMs
- Robust JSON parsing (fixes broken JSON, trailing commas, etc.)
- Function-calling for every model
- Support for multiple programming languages
- Better prompt management
BAML lets you define schema classes and functions that can be called from your preferred language (Python, TypeScript, Ruby, and more).
Installation & Usage 🚀
Create a new BAML project using npx:
# Create a new project with interactive prompts
npx create-baml-app
# Create a new project in a specific directory
npx create-baml-app my-baml-app
# Create a new project in the current directory
npx create-baml-app my-baml-app --use-current-dir
# or
npx create-baml-app my-baml-app -.
# Show help menu
npx create-baml-app --helpWhen using the interactive prompts:
- Enter your project name (defaults to 'my-app')
- Use "." to create the project in the current directory
- Or enter a name to create a new directory
The CLI will then:
- Create a new directory for your project (unless "." or --use-current-dir is specified)
- Help you select a programming language (Python, TypeScript, Ruby)
- Choose your preferred package manager
- Set up a complete BAML project structure
Supported Languages and Package Managers 🛠️
Python
- pip: Standard Python package manager
- Requires: Python installed on your system
- poetry: Modern Python dependency management
- Requires: Poetry installed
- uv: Fast Python package installer
- Requires: uv installed
TypeScript
- npm: Standard Node.js package manager
- Requires: Node.js installed
- pnpm: Fast, disk space efficient package manager
- Requires: pnpm installed
- yarn: Alternative Node.js package manager
- Requires: Yarn installed
- deno: Secure runtime for JavaScript and TypeScript
- Requires: Deno installed
- Note: For Deno in VSCode, add
{ "deno.unstable": ["sloppy-imports"] }to your settings
Ruby
Project Structure 📁
After running create-baml-app, you'll have a basic BAML project with:
- The BAML CLI installed
- Basic project structure with configuration files
- Initial BAML source files
Development Workflow 🧑💻
- Write BAML function definitions in
.bamlfiles - Generate client code with
baml-cli generate - Import and use the generated code in your application
Resources 📚
Contributing 🤝
Contributions are welcome! Please feel free to submit a Pull Request.
License 📄
This project is licensed under the MIT License. See the LICENSE file for details.
