Javascript SDK Installation
AI-Powered Install
MCP Install
Follow the MCP Getting Started guide to quickly set up the DevCycle MCP server and connect your AI tool.
- Run this prompt:
"Install DevCycle into this app"
📦 Install in Cursor
📦 Install in VS Code
claude mcp add --transport http devcycle https://mcp.devcycle.com/mcp
AI PromptCopy Prompt
NPM Module
The recommended way to include the JS SDK is by bundling it with the rest of your Javascript or Typescript application code using our NPM Module.
The JS SDK library can be found on NPM. To get started, install the JS SDK using NPM:
npm install --save @devcycle/js-client-sdk
To use the JS SDK in your project, import the initializeDevCycle
function:
import { initializeDevCycle } from '@devcycle/js-client-sdk'
Using the CDN
If you want to load the JS SDK on your webpage separately from your main application bundle, you can use a script tag to do so.
Place the following code snippet as high as possible in your head tag.
<script
src="https://js.devcycle.com/devcycle.min.js"
type="text/javascript"
></script>