How to install Botpress packages

Package Types in Botpress SDK

The Botpress SDK supports two types of packages:

  • Integration Packages
  • Interface Packages

Installing Packages

Basic Installation Syntax

npx bp add [--package-type <type>] <package-name>[@version]

Installing Interface Packages

To install an interface package, use the --package-type interface flag:

# Install HITL interface version 0.0.1
npx bp add --package-type interface [email protected]

Installing Integration Packages

Integration packages can be installed directly from the Botpress Hub:

# Install Github integration
npx bp add github

Using Installed Packages

After installation, packages are available in the bp_modules folder. Here's how to import and use them:

// Import the package
import hitl from './bp_modules/hitl'

// Use it in your integration definition
export default new IntegrationDefinition({
  // Your integration configuration
}).extend(hitl, () => ({}))