SDK Quickstart Guide
BugPilot Documentation
Learn how to integrate BugPilot's automatic bug capture SDK into your web applications.
Getting Started
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/reactWrap 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
| Option | Type | Description |
|---|---|---|
| projectKey | string | Your project API key from BugPilot dashboard. |
| captureConsole | boolean | Intercept console.error and console.warn (Default: true). |
| maskSensitiveInputs | boolean | Client-side PII field masking (Default: true). |