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.mdAlternatively, 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:
- Read your
package.jsonto detect the framework (Next.js, React, Express, Fastify, plain Node.js, or vanilla browser JS) and package manager - Ask for your DSN and any config it can't infer
- Install the correct SDK package (
@emit-vision/sdk-next,sdk-react,sdk-node, orsdk-js) - Write or update your initialization file with the right boilerplate for your stack
- Add the required env variables to
.env.localor.env
What it sets up by framework
| Framework | Package installed | What gets written |
|---|---|---|
| Next.js App Router | @emit-vision/sdk-next | EmitVisionProvider in app/layout.tsx, EMIT_VISION_DSN in .env.local |
| React (Vite / CRA) | @emit-vision/sdk-react | EmitVisionProvider wrapping root render, DSN env var in .env.local |
| Express | @emit-vision/sdk-node | init() + installProcessHandlers() + request middleware in server entry |
| Fastify | @emit-vision/sdk-node | init() + emitVisionFastifyPlugin registration in server entry |
| Node.js worker | @emit-vision/sdk-node | init() + installProcessHandlers() + SIGTERM flush in entry file |
| Vanilla JS / browser | @emit-vision/sdk-js | init() 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.