@codmir/sdk

The official Codmir SDK for JavaScript and TypeScript applications. Track errors, replay user sessions, and integrate with the Codmir API.

npm install @codmir/sdk

Get started with Codmir SDK

You can use the SDK for error tracking, session replay, performance monitoring, autonomous self-healing, and API integration.

Import the SDK for your platform: @codmir/sdk/nextjs for Next.js, @codmir/sdk/react-native for mobile, or @codmir/sdk/browser for vanilla JS.

Quick references

Platform imports

Next.js@codmir/sdk/nextjs
React Native@codmir/sdk/react-native
Browser@codmir/sdk/browser
Node.js@codmir/sdk/overseer

Quick Start (Next.js)

Every init call needs an apiKey: without one the ingest endpoint stores nothing. It is the osk_ key shown once when an admin creates it in your project's Overseer settings.

// instrumentation-client.ts
import * as Codmir from '@codmir/sdk/nextjs';

Codmir.init({
  dsn: process.env.NEXT_PUBLIC_OVERSEER_DSN,
  apiKey: process.env.NEXT_PUBLIC_OVERSEER_KEY,
  environment: process.env.NODE_ENV,
  replaysSessionSampleRate: 0.1,
  replaysOnErrorSampleRate: 1.0,
});

Self-Healing Patches

When Overseer detects a production error, it can autonomously classify and apply a fix without a full redeployment. Three fix types are supported:

Data FixConfig, DB record, or feature flag changes. No rebuild. Instant.
Edge FixUI/frontend patches deployed to the edge. Seconds to apply.
Code FixBackend code changes. Validated on branch, then targeted rebuild.

All patches go through a review gate — check your Inbox to approve or let Overseer auto-apply safe fixes while you're away. Every patch is linked to its ticket and incident for full traceability.

See the getting started guide for more information, or the npm package for installation details.