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