SDK Quickstart Guide

BugPilot Documentation

Learn how to integrate BugPilot's automatic bug capture SDK into your web applications.

1. CDN Script Tag (Fastest)

Add this single script tag right before the closing </head> tag in your HTML file:

<script src="https://cdn.bugpilot.io/sdk.js" data-project-key="YOUR_PROJECT_KEY" defer></script>

2. React / Next.js Integration

Install our official React wrapper via npm or yarn:

npm install @bugpilot/react

Wrap your root provider component:

import { BugPilotProvider } from '@bugpilot/react';

export default function App({ children }) {
  return (
    <BugPilotProvider projectKey="YOUR_PROJECT_KEY">
      {children}
    </BugPilotProvider>
  );
}

3. Configuration & Options

OptionTypeDescription
projectKeystringYour project API key from BugPilot dashboard.
captureConsolebooleanIntercept console.error and console.warn (Default: true).
maskSensitiveInputsbooleanClient-side PII field masking (Default: true).