AI-Assisted Setup

If you use Claude Code, you can install the init-emit-sdk skill and let an agent handle SDK wiring for you. It detects your framework, installs the right package, writes the initialization boilerplate, and sets up your env file — all from a single command.

This is entirely optional. If you prefer to follow the manual steps, head to the Installation guide.

Prerequisites

  • Claude Code installed on your machine
  • A running Emit Vision instance and your project DSN (find it on the Setup page in the dashboard)

Install the skill

The skill is a single markdown file. Save it to your global Claude skills folder so it's available in any project:

# Create the skills folder if it doesn't exist
mkdir -p ~/.claude/skills
 
# Download the skill file (replace the URL with your Emit Vision instance)
curl -o ~/.claude/skills/init-emit-sdk.md <YOUR_EMIT_VISION_HOST>/docs/skills/init-emit-sdk.md

Alternatively, copy the raw file from this repository at docs/claude-skill-setup.md and save it as ~/.claude/skills/init-emit-sdk.md.

Run it

Open Claude Code in your project directory and run:

/init-emit-sdk

Claude will:

  1. Read your package.json to detect the framework (Next.js, React, Express, Fastify, plain Node.js, or vanilla browser JS) and package manager
  2. Ask for your DSN and any config it can't infer
  3. Install the correct SDK package (@emit-vision/sdk-next, sdk-react, sdk-node, or sdk-js)
  4. Write or update your initialization file with the right boilerplate for your stack
  5. Add the required env variables to .env.local or .env

What it sets up by framework

FrameworkPackage installedWhat gets written
Next.js App Router@emit-vision/sdk-nextEmitVisionProvider in app/layout.tsx, EMIT_VISION_DSN in .env.local
React (Vite / CRA)@emit-vision/sdk-reactEmitVisionProvider wrapping root render, DSN env var in .env.local
Express@emit-vision/sdk-nodeinit() + installProcessHandlers() + request middleware in server entry
Fastify@emit-vision/sdk-nodeinit() + emitVisionFastifyPlugin registration in server entry
Node.js worker@emit-vision/sdk-nodeinit() + installProcessHandlers() + SIGTERM flush in entry file
Vanilla JS / browser@emit-vision/sdk-jsinit() with autoCapture in entry file

After setup

Once your app is running, open your Emit Vision dashboard and navigate to Events → Recent events. The first event should appear within a few seconds.

From there, use captureEvent(), captureError(), and identify() anywhere in your codebase — see the SDK Reference for the full API.