Skip to main content

Installation

Prerequisites​

  • Node.js: 20.0.0 or higher (latest LTS recommended)
  • npm: 9.0.0 or higher
  • TypeScript: 5.8.0 or higher
  • Docker: Required for local development

Quick Install​

Install Individual Packages​

# Core API Gateway
npm install @bluefly/llm-gateway

# MCP Server Protocol
npm install @bluefly/llm-mcp

# CLI Tools
npm install -g @bluefly/llmcli

# Security Framework
npm install @bluefly/secure-project

# UI Components
npm install @bluefly/llm-ui

Install via CLI​

# Install CLI globally
npm install -g @bluefly/llmcli

# Use CLI to set up platform
llmcli platform install

# Verify installation
llmcli platform status

Development Setup​

Clone and Build All Packages​

# Clone the repository
git clone https://github.com/bluefly/llm-platform.git
cd llm-platform

# Install all dependencies
npm install

# Build all packages
npm run build

# Run tests
npm test

Individual Package Development​

# Work on a specific package
cd _CommonNPM/llm-gateway
npm install
npm run build
npm test

Environment Configuration​

Environment Variables​

Create a .env file in your project root:

# API Gateway Configuration
LLM_GATEWAY_PORT=3000
LLM_GATEWAY_HOST=localhost

# Provider API Keys (optional)
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key

# Ollama Configuration (local AI)
OLLAMA_BASE_URL=http://localhost:11434

# Security Configuration
JWT_SECRET=your_jwt_secret

Docker Setup​

# Start services with Docker Compose
docker-compose up -d

# Verify services are running
docker-compose ps

Verification​

Test Your Installation​

# Test CLI
llmcli --version

# Test API Gateway
curl http://localhost:3000/health

# Test MCP Server
llmcli mcp test

# Test AI Providers
llmcli ai test-ollama

Common Issues​

Node.js Version

# Check Node.js version
node --version
# Should be 20.0.0 or higher

Permission Issues

# Fix npm global permissions
npm config set prefix ~/.npm-global
export PATH=~/.npm-global/bin:$PATH

Docker Issues

# Reset Docker if needed
docker system prune -f
docker-compose down && docker-compose up -d

Next Steps​