1.5.3 • Published 4 months ago

@juspay/neurolink v1.5.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

🧠 NeuroLink

npm version TypeScript License: MIT

Universal AI toolkit with 5+ provider support, automatic fallback, and both CLI + SDK interfaces. Production-ready with TypeScript support.

NeuroLink unifies OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, and Azure OpenAI with intelligent fallback and streaming support. Available as both a programmatic SDK and professional CLI tool. Extracted from production use at Juspay.

🚀 Quick Start

Install & Run (2 minutes)

# Quick setup with Google AI Studio (free tier available)
export GOOGLE_AI_API_KEY="AIza-your-google-ai-api-key"

# CLI - No installation required
npx @juspay/neurolink generate-text "Hello, AI"
npx @juspay/neurolink status
# SDK Installation for using in your typescript projects
npm install @juspay/neurolink

Basic Usage

import { createBestAIProvider } from '@juspay/neurolink';

// Auto-selects best available provider
const provider = createBestAIProvider();
const result = await provider.generateText({
  prompt: "Write a haiku about programming"
});

console.log(result.text);
console.log(`Used: ${result.provider}`);

Environment Setup

# Create .env file (automatically loaded by CLI)
echo 'OPENAI_API_KEY="sk-your-openai-key"' > .env
echo 'GOOGLE_AI_API_KEY="AIza-your-google-ai-key"' >> .env
echo 'AWS_ACCESS_KEY_ID="your-aws-access-key"' >> .env

# Test configuration
npx @juspay/neurolink status

📖 Complete Setup Guide - All providers with detailed instructions

✨ Key Features

  • 🔄 5+ AI Providers - OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, Azure
  • Automatic Fallback - Never fail when providers are down
  • 🖥️ CLI + SDK - Use from command line or integrate programmatically
  • 🛡️ Production Ready - TypeScript, error handling, extracted from production
  • 🔧 MCP Integration - Model Context Protocol support for extensibility
  • 🤖 AI Analysis Tools - Built-in optimization and workflow assistance

💻 Essential Examples

CLI Commands

# Text generation with provider selection
npx @juspay/neurolink generate-text "Explain quantum computing" --provider openai

# Real-time streaming
npx @juspay/neurolink stream "Tell me a story about robots"

# Provider diagnostics
npx @juspay/neurolink status --verbose

# Batch processing
echo -e "Write a haiku\nExplain gravity" > prompts.txt
npx @juspay/neurolink batch prompts.txt --output results.json

SDK Integration

// SvelteKit API route
export const POST: RequestHandler = async ({ request }) => {
  const { message } = await request.json();
  const provider = createBestAIProvider();
  const result = await provider.streamText({ prompt: message });
  return new Response(result.toReadableStream());
};

// Next.js API route
export async function POST(request: NextRequest) {
  const { prompt } = await request.json();
  const provider = createBestAIProvider();
  const result = await provider.generateText({ prompt });
  return NextResponse.json({ text: result.text });
}

🎬 See It In Action

No installation required! Experience NeuroLink through comprehensive visual documentation:

📱 Interactive Web Demo

cd neurolink-demo && node server.js
# Visit http://localhost:9876 for live demo
  • Real AI Integration: All 5 providers functional with live generation
  • Complete Use Cases: Business, creative, and developer scenarios
  • Performance Metrics: Live provider analytics and response times

🖥️ CLI Demonstrations

🌐 Web Interface Videos

📖 Complete Visual Documentation - All screenshots and videos

📚 Documentation

Getting Started

Advanced Features

Reference

🏗️ Supported Providers & Models

ProviderModelsAuth MethodFree Tier
OpenAIGPT-4o, GPT-4o-miniAPI Key
Google AI StudioGemini 1.5/2.0 Flash/ProAPI Key
Amazon BedrockClaude 3.5/3.7 SonnetAWS Credentials
Google Vertex AIGemini 2.5 FlashService Account
AnthropicClaude 3.5 SonnetAPI Key
Azure OpenAIGPT-4, GPT-3.5API Key + Endpoint

✨ Auto-Selection: NeuroLink automatically chooses the best available provider based on speed, reliability, and configuration.

🎯 Production Features

Enterprise-Grade Reliability

  • Automatic Failover: Seamless provider switching on failures
  • Error Recovery: Comprehensive error handling and logging
  • Performance Monitoring: Built-in analytics and metrics
  • Type Safety: Full TypeScript support with IntelliSense

AI Platform Capabilities

  • MCP Foundation: Universal AI development platform with 10+ specialized tools
  • Analysis Tools: Usage optimization, performance benchmarking, parameter tuning
  • Workflow Tools: Test generation, code refactoring, documentation, debugging
  • Extensibility: Connect external tools and services via MCP protocol

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Setup

git clone https://github.com/juspay/neurolink
cd neurolink
pnpm install
pnpm test
pnpm build

📄 License

MIT © Juspay Technologies

🔗 Related Projects