Installation
Install the Metigan SDK in your project using npm, yarn, or pnpm. The SDK is lightweight, type-safe, and works seamlessly with TypeScript and JavaScript.
Package Managers
Choose your preferred package manager and install the Metigan SDK:
# Using npm
npm install metigan
# Using yarn
yarn add metigan
# Using pnpm
pnpm add metiganThe current stable version is 2.2.1. Make sure you're using the latest version for the best experience and latest features.
Requirements
Before installing, make sure you have the following prerequisites:
Node.js
Version 14.0.0 or higher is required. You can check your version by running node --version
TypeScript (Optional)
TypeScript 4.0.0 or higher is recommended but not required. The SDK works great with plain JavaScript too!
API Key
A valid Metigan API key is required. Get one from your dashboard.
Verifying Installation
After installation, verify that the package is installed correctly:
import Metigan from 'metigan';
// Check if Metigan is available
console.log('Metigan version:', Metigan.VERSION || '2.2.1');
// Initialize (this will throw if there's an issue)
const metigan = new Metigan({
apiKey: 'your_api_key'
});
console.log('✅ Metigan SDK installed successfully!');The Metigan SDK is written in TypeScript and includes complete type definitions out of the box. No additional @types package is needed. You'll get full autocomplete and type checking in your IDE.