Node.js SDK

Installation

@vigilry/node is published to npm and supports Node.js 18 and above. It has zero runtime dependencies.

Package Managers

npm
npm install @vigilry/node
pnpm
pnpm add @vigilry/node
yarn
yarn add @vigilry/node

Requirements

RequirementVersionNotes
Node.js≥ 18.0.0Required for native fetch() support
TypeScript≥ 4.7Optional — type definitions included
Module formatCommonJSESM interop via require/import

Importing the SDK

typescript
// ESM / TypeScript
import { Vigilry } from "@vigilry/node";

// CommonJS
const { Vigilry } = require("@vigilry/node");

Environment Variable

Store your API key in an environment variable. Never hardcode it in source code.

.env
VIGILRY_API_KEY=vig_live_abc123def456...
index.ts
import { Vigilry } from "@vigilry/node";

const vigilry = new Vigilry({
  apiKey: process.env.VIGILRY_API_KEY!,
});