Generate TypeScript type definitions for your Botpress project to enable autocomplete and type checking.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/botpress/botpress/llms.txt
Use this file to discover all available pages before exploring further.
Usage
bp gen
What it does
The generate command:- Analyzes your project definition
- Reads installed integrations and interfaces
- Generates TypeScript type definitions
- Outputs
.d.tsfiles for intellisense
Options
—workDir
Specify project directory:Global options
All global options are available:Generated files
Typings are generated in:- Type definitions for events
- Type definitions for actions
- Type definitions for states
- Type definitions for configurations
- Autocomplete for installed integrations
When to generate
Runbp generate after:
- Creating a new project
- Installing integrations/interfaces
- Updating project definition
- Changing events, actions, or states
Generate is automatically run during
bp buildExamples
Generate for current project
Generate for specific project
Generate with verbose output
Integration with IDEs
Generated types enable:- IntelliSense in VS Code
- Type checking in TypeScript
- Autocomplete for Botpress APIs
- Go-to-definition navigation
Development workflow
Troubleshooting
Types not showing up
Ensure your IDE is using the workspace TypeScript version:- Open command palette
- Select “TypeScript: Select TypeScript Version”
- Choose “Use Workspace Version”
Outdated types
Regenerate after any project changes:Build vs Generate
bp generate: Only generates typesbp build: Generates types AND bundles code
generate for faster iteration during development.