fern/01-guide/01-editors/jetbrains.mdx
The BAML plugin for JetBrains IDEs provides full support for editing and testing BAML files in IntelliJ IDEA, PyCharm, WebStorm, and other JetBrains IDEs.
Alternatively, you can install directly from the JetBrains Marketplace.
| Feature | Supported |
|---|---|
| Syntax highlighting for BAML files | ✅ |
| Language Server Protocol (LSP) integration | ✅ |
| Jump to definition | ✅ |
| LLM playground for testing BAML functions | ✅ |
| Auto-download of BAML CLI | ✅ |
Once you open a .baml file, you can access the BAML Playground in several ways:
Cmd+Shift+A on macOS or Ctrl+Shift+A on Windows/Linux) and search for "Open BAML Playground"The playground allows you to set environment variables (like API keys) that persist between sessions. Click on the Settings button in the playground to configure them.
<Info> Environment variables are stored locally in your IDE's storage. They are not sent across the network or saved to disk outside of the IDE. </Info>The BAML plugin works with all JetBrains IDEs that support plugins, including:
Make sure your BAML files have the .baml extension and are located in a baml_src directory in your project.
The plugin automatically downloads the BAML CLI/Language Server on first use. If you encounter issues:
The playground uses JCEF (Java Chromium Embedded Framework). If it fails to load:
If you encounter any issues or have feature requests, please: