Package Manager
Install the SDK using your preferred package manager:Requirements
- Node.js 16+ or modern browser environment
- TypeScript 4.5+ (optional, for TypeScript projects)
API Key
You’ll need a Context7 API key to use the SDK. Get one from context7.com. API keys follow the format:ctx7sk-...
Environment Setup
Environment Variable (Recommended)
Set your API key as an environment variable:Direct Configuration
Alternatively, pass the API key directly to the constructor:TypeScript Support
The SDK is written in TypeScript and includes full type definitions. No additional@types packages are needed.
Verification
Verify your installation with a quick test:Next Steps
Client Configuration
Learn how to initialize and configure the Context7 client