Skip to content

Netlify SDK utility tools reference

The Netlify SDK comes with a small tooling library called netlify-integration. It allows you to perform tasks like creating and building your integration, as well as previewing your connector GraphQL server or your integration UI.

Install

Install the Netlify SDK utility tools globally using your preferred package manager:

pnpm install -g @netlify/sdk

Make sure your project includes the appropriate scripts

When you use the SDK’s guided set-up flow to create an integration, we automatically add scripts to your project that run the appropriate netlify-integration commands. If you skipped the guided set-up flow, make sure you manually update your package.json to include scripts for the commands you want to run. For example, "dev": "netlify-integration dev".

Commands

build

This builds your integration. By default, it builds all components necessary for your integration to work including any Connectors, Build Event Handlers, API Handlers, or Integration UI.

Flags

FlagTypeDescription
-a, --allbooleanBuild all components of the integration
-c, --connectorbooleanBuild the connector component of the integration
-w, --watchbooleanBuild integration and then watch for changes
-b, --buildtimebooleanBuild the buildtime component of the integration
-s, --sitebooleanBuild the serverless component of the integration

dev

This runs a local GraphQL server for your connector that makes it possible to load the graphiql UI and test queries locally.

Flags

FlagTypeDescription
-a, --allbooleanBuild all components of the integration
-c, --connectorbooleanBuild the connector component of the integration
-b, --buildtimebooleanBuild the buildtime component of the integration
-s, --sitebooleanBuild the serverless component of the integration

preview

This allows you to preview your Integration UI. It builds your UI and then runs a server that serves your UI and any handlers you might have.

Flags

FlagTypeDescription
-c, --connectorbooleanPreview the GraphQL server for your connector component