Preparing your workspace...

assistant-chat.tsx2.5k
utils.ts850
button.tsx720
Quick Actions
codmir
Docs
Discord
Get started
API
  • Introduction
  • Installation
  • Your First Project
  • Your First Agent
  • Overview
  • OverseerClient
  • Error Tracking
  • Session Replay
  • Incidents
  • Deployments
  • Orchestrator
    • Next.js
    • React
    • Express
    • Vue
    • Svelte

Set up Overseer in your SvelteKit application

SvelteKit Integration

Set up Overseer in SvelteKit applications.

Installation

npm install @codmir/overseer
yarn add @codmir/overseer
pnpm add @codmir/overseer
bun add @codmir/overseer

Client Setup

Create src/hooks.client.ts:

// src/hooks.client.ts
import { init, captureException } from '@codmir/overseer';

init({
  dsn: import.meta.env.VITE_OVERSEER_DSN,
  service: 'sveltekit-app',
  environment: import.meta.env.MODE,
  enableReplay: true,
  enablePerformance: true,
});

export function handleError({ error, event }) {
  captureException(error as Error, {
    extra: {
      url: event.url.pathname,
      route: event.route?.id,
    },
  });
  console.error('Client error:', error);
}

Server Setup

Create src/hooks.server.ts:

// src/hooks.server.ts
import { captureException } from '@codmir/overseer';

export function handleError({ error, event }) {
  captureException(error as Error, {
    extra: {
      url: event.url.pathname,
      method: event.request.method,
    },
  });
  console.error('Server error:', error);
}

Usage in Components

<script lang="ts">
  import { onMount } from 'svelte';
  import { captureException, addBreadcrumb, setUser } from '@codmir/overseer';
  
  export let user: { id: string; email: string };
  
  onMount(() => {
    setUser({ id: user.id, email: user.email });
  });
  
  async function handleClick() {
    addBreadcrumb({
      category: 'ui.click',
      message: 'Button clicked',
      level: 'info',
    });
    
    try {
      await performAction();
    } catch (error) {
      captureException(error as Error);
    }
  }
</script>

<button on:click={handleClick}>
  Do Action
</button>

Error Page

Create src/routes/+error.svelte:

<script lang="ts">
  import { page } from '$app/stores';
  import { captureException } from '@codmir/overseer';
  import { onMount } from 'svelte';
  
  onMount(() => {
    if ($page.error) {
      captureException(new Error($page.error.message));
    }
  });
</script>

<div class="error-page">
  <h1>{$page.status}</h1>
  <p>{$page.error?.message}</p>
  <a href="/">Go home</a>
</div>

Environment Variables

# .env
VITE_OVERSEER_DSN=https://your-project.codmir.com/overseer
Open in ChatGPTOpen in ClaudeConnect MCP on CursorConnect MCP on WindsurfEdit on GitHub
codmir
Products
Desktop AppMobile AppIDE ExtensionAI AgentsOverseerVoice ModeCortex ProtocolHive MindGame Dev (Godat)PricingDownload
Solutions
AI Code AgentsCode ReviewError TrackingSelf-HealingDeploy TrackingAI Tracking SDKWorkflow AutomationTesting FrameworkTime TrackingVoice Control
Platform
ProjectsTickets & BoardsAgent MarketplaceIntegrationsTemplatesApp HubAdmin PanelAnalytics
Integrations
GitHubSlackDiscordVercelSentryRailwayLinearAll Integrations
Developers
DocumentationAPI ReferenceSDKCLIDeveloper PortalMarketplaceMCP ConnectorsWebhooksExamplesnpm Packages
Resources
BlogChangelogCommunityTutorialsGet StartedSupportStatusFeedback
Company
AboutCareersContact SalesKickstarterReferral Program
Legal
Terms of UsePrivacy PolicyEULATrademarkSecurity
Download on the App StoreGet it on Google Play

Codmir™ 2026. All rights reserved.

Free & open source SDK — Apache 2.0 License