Skip to main content

Installation

Requirements

  • Node.js 20 or higher
  • npm

Install the Package

npm install toolpack-sdk

Set Up API Keys

Toolpack SDK uses your own API keys - there are no subscription plans or middleman services. Set the appropriate environment variable for your provider:

# OpenAI
export OPENAI_API_KEY="sk-..."

# Anthropic
export ANTHROPIC_API_KEY="sk-ant-..."

# Google Gemini
export GEMINI_API_KEY="..."

# Ollama (no API key required - runs locally)

You can also pass API keys directly in code:

const toolpack = await Toolpack.init({
provider: 'openai',
apiKey: 'sk-...', // Direct API key
});

Verify Installation

Create a simple test file:

import { Toolpack } from 'toolpack-sdk';

async function main() {
const toolpack = await Toolpack.init({
provider: 'openai',
});

const response = await toolpack.generate('Hello, world!');
console.log(response.content);
}

main();

Run it:

npx tsx test.ts

If you see a response from the AI, you're ready to go!

Next Steps

  • Quick Start - Build your first AI application
  • Providers - Learn about supported AI providers
  • Tools - Explore the 77 built-in tools

Source Code