Skip to main content

Installation

Get Devcogent up and running in your project with these simple installation steps.

Prerequisites

Before installing Devcogent, ensure you have:

  • Node.js 16.0 or higher
  • npm or yarn package manager
  • A Devcogent account (sign up at devcogent.com)

Installation Methods

NPM Installation

Install Devcogent via npm:

npm install @devcogent/sdk

Yarn Installation

Install Devcogent via yarn:

yarn add @devcogent/sdk

CDN Installation

Include Devcogent directly in your HTML:

<script src="https://cdn.devcogent.com/sdk/latest/devcogent.min.js"></script>

Environment Setup

Create a .env file in your project root:

DEVCOGENT_API_KEY=your_api_key_here
DEVCOGENT_API_URL=https://api.devcogent.com

Verification

Verify your installation by running:

import { Devcogent } from '@devcogent/sdk';

const client = new Devcogent({
apiKey: process.env.DEVCOGENT_API_KEY
});

// Test connection
client.ping().then(() => {
console.log('Devcogent connected successfully!');
});

Next Steps

Once installation is complete, continue to our Quick Start Guide to begin using Devcogent.