@juspay/neurolink 1.3.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -0
- package/LICENSE +21 -0
- package/README.md +99 -286
- package/dist/cli/commands/config.d.ts +33 -3
- package/dist/cli/commands/config.js +36 -1
- package/dist/cli/index.js +11 -9
- package/dist/core/factory.js +6 -2
- package/dist/core/types.d.ts +12 -2
- package/dist/core/types.js +11 -0
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.d.ts +21 -0
- package/dist/mcp/servers/ai-providers/ai-analysis-tools.js +215 -0
- package/dist/mcp/servers/ai-providers/ai-core-server.d.ts +1 -1
- package/dist/mcp/servers/ai-providers/ai-core-server.js +28 -6
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.d.ts +101 -0
- package/dist/mcp/servers/ai-providers/ai-workflow-tools.js +430 -0
- package/dist/neurolink.d.ts +4 -4
- package/dist/neurolink.js +109 -56
- package/dist/providers/googleAIStudio.d.ts +30 -0
- package/dist/providers/googleAIStudio.js +215 -0
- package/dist/providers/googleVertexAI.js +2 -2
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +3 -1
- package/dist/providers/openAI.js +2 -2
- package/dist/utils/providerUtils.js +5 -2
- package/package.json +4 -16
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,103 @@
|
|
|
1
1
|
# @juspay/neurolink
|
|
2
2
|
|
|
3
|
+
## 1.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **🔧 Critical CLI Dependency Fix**: Removed peer dependencies to ensure zero-friction CLI usage
|
|
8
|
+
- **Issue**: CLI commands failed when provider-specific SDK packages were peer dependencies
|
|
9
|
+
- **Root Cause**: `npx` doesn't install peer dependencies, causing missing module errors
|
|
10
|
+
- **Solution**: Moved ALL AI provider SDKs to regular dependencies
|
|
11
|
+
- **Impact**: **100% reliable CLI** - all providers work immediately with `npx @juspay/neurolink`
|
|
12
|
+
- **Dependencies**: All AI SDK packages now bundled automatically (@ai-sdk/openai, @ai-sdk/bedrock, @ai-sdk/vertex, @ai-sdk/google)
|
|
13
|
+
|
|
14
|
+
- **📄 Critical Legal Compliance**: Added missing MIT LICENSE file
|
|
15
|
+
- **Issue**: Package claimed MIT license but had no LICENSE file in repository
|
|
16
|
+
- **Legal Risk**: Without explicit license file, users had no legal permission to use the software
|
|
17
|
+
- **Solution**: Added proper MIT License file with Juspay Technologies copyright (2025)
|
|
18
|
+
- **Impact**: **Full legal compliance** - users now have explicit permission to use, modify, and distribute
|
|
19
|
+
- **Files**: Added `LICENSE` file with standard MIT license text
|
|
20
|
+
|
|
21
|
+
### Technical Changes
|
|
22
|
+
|
|
23
|
+
- **Dependency Structure**: Eliminated peer dependencies entirely for CLI compatibility
|
|
24
|
+
- **Provider Support**: All 5 AI providers (OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic) now work out-of-the-box
|
|
25
|
+
- **Zero Setup**: No manual dependency installation required for any provider
|
|
26
|
+
- **Repository Structure**: LICENSE file now included in package distribution
|
|
27
|
+
- **Legal Clarity**: Explicit copyright and permission statements
|
|
28
|
+
- **Compliance**: Matches industry standards for open source software licensing
|
|
29
|
+
- **Package Files**: LICENSE included in NPM package distribution
|
|
30
|
+
- **Backward Compatibility**: 100% compatible with existing code and configurations
|
|
31
|
+
|
|
32
|
+
## 1.5.0
|
|
33
|
+
|
|
34
|
+
### Major Changes
|
|
35
|
+
|
|
36
|
+
- **🧠 Google AI Studio Integration**: Added Google AI Studio as 5th AI provider with Gemini models
|
|
37
|
+
- **🔧 New Provider**: Complete GoogleAIStudio provider with Gemini 1.5/2.0 Flash/Pro models
|
|
38
|
+
- **🆓 Free Tier Access**: Leverage Google's generous free tier for development and testing
|
|
39
|
+
- **🖥️ CLI Support**: Full `--provider google-ai` integration across all commands
|
|
40
|
+
- **⚡ Auto-Selection**: Included in automatic provider selection algorithm
|
|
41
|
+
- **🔑 Simple Setup**: Single `GOOGLE_AI_API_KEY` environment variable configuration
|
|
42
|
+
|
|
43
|
+
### Features
|
|
44
|
+
|
|
45
|
+
- **📚 Documentation Architecture Overhaul**: Complete README.md restructuring for better UX
|
|
46
|
+
- **75% Size Reduction**: Transformed from 800+ lines to ~200 lines focused on quick start
|
|
47
|
+
- **Progressive Disclosure**: Clear path from basic → intermediate → advanced documentation
|
|
48
|
+
- **Specialized Documentation**: Created 4 dedicated docs files for different audiences
|
|
49
|
+
- **Cross-References**: Complete navigation system between all documentation files
|
|
50
|
+
|
|
51
|
+
### New Documentation Structure
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
docs/
|
|
55
|
+
├── AI-ANALYSIS-TOOLS.md # AI optimization and analysis tools
|
|
56
|
+
├── AI-WORKFLOW-TOOLS.md # Development lifecycle tools
|
|
57
|
+
├── MCP-FOUNDATION.md # Technical MCP architecture
|
|
58
|
+
└── GOOGLE-AI-STUDIO-INTEGRATION-ARCHIVE.md # Integration details
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Google AI Studio Provider
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
// New Google AI Studio usage
|
|
65
|
+
import { createBestAIProvider } from '@juspay/neurolink';
|
|
66
|
+
|
|
67
|
+
const provider = createBestAIProvider(); // Auto-includes Google AI Studio
|
|
68
|
+
const result = await provider.generateText("Hello, Gemini!");
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Quick setup with Google AI Studio (free tier)
|
|
73
|
+
export GOOGLE_AI_API_KEY="AIza-your-google-ai-key"
|
|
74
|
+
npx @juspay/neurolink generate-text "Hello, AI!" --provider google-ai
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Enhanced Visual Content
|
|
78
|
+
|
|
79
|
+
- **Google AI Studio Demos**: Complete visual documentation for new provider
|
|
80
|
+
- **CLI Demonstrations**: Updated CLI videos showing google-ai provider
|
|
81
|
+
- **Professional Quality**: 6 new videos and asciinema recordings
|
|
82
|
+
|
|
83
|
+
### Technical Implementation
|
|
84
|
+
|
|
85
|
+
- **Provider Integration**: `src/lib/providers/googleAIStudio.ts`
|
|
86
|
+
- **Models Supported**: Gemini 1.5 Pro/Flash, Gemini 2.0 Flash/Pro
|
|
87
|
+
- **Authentication**: Simple API key authentication via Google AI Studio
|
|
88
|
+
- **Testing**: Complete test coverage including provider and CLI tests
|
|
89
|
+
|
|
90
|
+
### Bug Fixes
|
|
91
|
+
|
|
92
|
+
- **🔧 CLI Dependencies**: Moved essential dependencies (`ai`, `zod`) from peer to regular dependencies
|
|
93
|
+
- **Issue**: `npx @juspay/neurolink` commands failed due to missing dependencies
|
|
94
|
+
- **Solution**: CLI now works out-of-the-box without manual dependency installation
|
|
95
|
+
- **Impact**: Zero-friction CLI usage for all users
|
|
96
|
+
|
|
97
|
+
### Breaking Changes
|
|
98
|
+
|
|
99
|
+
- None - 100% backward compatibility maintained
|
|
100
|
+
|
|
3
101
|
## 1.4.0
|
|
4
102
|
|
|
5
103
|
### Major Changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Juspay Technologies
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -4,67 +4,37 @@
|
|
|
4
4
|
[](http://www.typescriptlang.org/)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> Universal AI toolkit with 5+ provider support, automatic fallback, and both CLI + SDK interfaces. Production-ready with TypeScript support.
|
|
8
8
|
|
|
9
|
-
**NeuroLink**
|
|
10
|
-
|
|
11
|
-
## 🎉 **NEW: MCP Foundation (Model Context Protocol)**
|
|
12
|
-
|
|
13
|
-
**NeuroLink v1.3.0** introduces a groundbreaking **MCP Foundation** that transforms NeuroLink from an AI SDK into a **Universal AI Development Platform** while maintaining the simple factory method interface.
|
|
14
|
-
|
|
15
|
-
### **🏆 Phase 1 Complete: 27/27 Tests Passing**
|
|
16
|
-
- ✅ **Factory-First Architecture**: MCP tools work internally, users see simple factory methods
|
|
17
|
-
- ✅ **MCP Compatible**: 99% compatible with existing MCP tools and servers
|
|
18
|
-
- ✅ **Enterprise Ready**: Rich context, permissions, tool orchestration, analytics
|
|
19
|
-
- ✅ **Production Tested**: <1ms tool execution, comprehensive error handling
|
|
20
|
-
|
|
21
|
-
### **🚀 What This Means for You**
|
|
22
|
-
```typescript
|
|
23
|
-
// Same simple interface you love
|
|
24
|
-
const result = await provider.generateText("Create a React component");
|
|
25
|
-
|
|
26
|
-
// But now powered by enterprise-grade MCP tool orchestration internally:
|
|
27
|
-
// - Context tracking across tool chains
|
|
28
|
-
// - Permission-based security
|
|
29
|
-
// - Tool registry and discovery
|
|
30
|
-
// - Pipeline execution with error recovery
|
|
31
|
-
// - Rich analytics and monitoring
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### **🔧 MCP Architecture**
|
|
35
|
-
- **🏭 MCP Server Factory**: Standard MCP-compatible server creation
|
|
36
|
-
- **🧠 Context Management**: Rich context with 15+ fields + tool chain tracking
|
|
37
|
-
- **📋 Tool Registry**: Discovery, registration, execution + statistics
|
|
38
|
-
- **🎼 Tool Orchestration**: Single tools + sequential pipelines + error handling
|
|
39
|
-
- **🤖 AI Provider Integration**: Core AI tools with schema validation
|
|
40
|
-
|
|
41
|
-
**Ready for Phase 2**: MCP tool migration enabling unlimited extensibility while preserving the simple interface developers love.
|
|
9
|
+
**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.
|
|
42
10
|
|
|
43
11
|
## 🚀 Quick Start
|
|
44
12
|
|
|
45
|
-
###
|
|
13
|
+
### Install & Run (2 minutes)
|
|
46
14
|
|
|
47
15
|
```bash
|
|
48
|
-
#
|
|
16
|
+
# Quick setup with Google AI Studio (free tier available)
|
|
17
|
+
export GOOGLE_AI_API_KEY="AIza-your-google-ai-api-key"
|
|
18
|
+
|
|
19
|
+
# CLI - No installation required
|
|
49
20
|
npx @juspay/neurolink generate-text "Hello, AI!"
|
|
50
21
|
npx @juspay/neurolink status
|
|
22
|
+
```
|
|
51
23
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
# SDK Installation
|
|
57
|
-
npm install @juspay/neurolink ai @ai-sdk/amazon-bedrock @ai-sdk/openai @ai-sdk/google-vertex zod
|
|
24
|
+
```bash
|
|
25
|
+
# SDK Installation for using in your typescript projects
|
|
26
|
+
npm install @juspay/neurolink
|
|
58
27
|
```
|
|
59
28
|
|
|
60
|
-
###
|
|
29
|
+
### Basic Usage
|
|
30
|
+
|
|
61
31
|
```typescript
|
|
62
32
|
import { createBestAIProvider } from '@juspay/neurolink';
|
|
63
33
|
|
|
64
34
|
// Auto-selects best available provider
|
|
65
35
|
const provider = createBestAIProvider();
|
|
66
36
|
const result = await provider.generateText({
|
|
67
|
-
prompt: "
|
|
37
|
+
prompt: "Write a haiku about programming"
|
|
68
38
|
});
|
|
69
39
|
|
|
70
40
|
console.log(result.text);
|
|
@@ -72,177 +42,59 @@ console.log(`Used: ${result.provider}`);
|
|
|
72
42
|
```
|
|
73
43
|
|
|
74
44
|
### Environment Setup
|
|
45
|
+
|
|
75
46
|
```bash
|
|
76
|
-
# Create .env file (automatically loaded by CLI)
|
|
77
|
-
# OpenAI
|
|
47
|
+
# Create .env file (automatically loaded by CLI)
|
|
78
48
|
echo 'OPENAI_API_KEY="sk-your-openai-key"' > .env
|
|
79
|
-
echo '
|
|
80
|
-
|
|
81
|
-
# Amazon Bedrock
|
|
49
|
+
echo 'GOOGLE_AI_API_KEY="AIza-your-google-ai-key"' >> .env
|
|
82
50
|
echo 'AWS_ACCESS_KEY_ID="your-aws-access-key"' >> .env
|
|
83
|
-
echo 'AWS_SECRET_ACCESS_KEY="your-aws-secret-key"' >> .env
|
|
84
|
-
echo 'AWS_REGION="us-east-1"' >> .env
|
|
85
|
-
echo 'BEDROCK_MODEL="arn:aws:bedrock:region:account:inference-profile/model"' >> .env
|
|
86
51
|
|
|
87
|
-
#
|
|
88
|
-
echo 'GOOGLE_VERTEX_PROJECT="your-project-id"' >> .env
|
|
89
|
-
echo 'GOOGLE_VERTEX_LOCATION="us-central1"' >> .env
|
|
90
|
-
echo 'GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"' >> .env
|
|
91
|
-
|
|
92
|
-
# Anthropic
|
|
93
|
-
echo 'ANTHROPIC_API_KEY="sk-ant-api03-your-key"' >> .env
|
|
94
|
-
|
|
95
|
-
# Azure OpenAI
|
|
96
|
-
echo 'AZURE_OPENAI_API_KEY="your-azure-key"' >> .env
|
|
97
|
-
echo 'AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"' >> .env
|
|
98
|
-
echo 'AZURE_OPENAI_DEPLOYMENT_ID="your-deployment-name"' >> .env
|
|
99
|
-
|
|
100
|
-
# Test configuration (automatically loads .env)
|
|
52
|
+
# Test configuration
|
|
101
53
|
npx @juspay/neurolink status
|
|
102
54
|
```
|
|
103
55
|
|
|
104
|
-
**📖 [Complete
|
|
105
|
-
|
|
106
|
-
## 🎬 Complete Visual Documentation
|
|
107
|
-
|
|
108
|
-
**No installation required!** Experience NeuroLink's capabilities through our comprehensive visual ecosystem:
|
|
109
|
-
|
|
110
|
-
### 🌐 Web Demo Screenshots & Videos
|
|
111
|
-
|
|
112
|
-
#### **📸 Interactive Web Interface Screenshots**
|
|
113
|
-
| Feature | Screenshot | Description |
|
|
114
|
-
|---------|------------|-------------|
|
|
115
|
-
| **Main Interface** |  | Complete web interface showing all features |
|
|
116
|
-
| **AI Generation Results** |  | Real AI content generation in action |
|
|
117
|
-
| **Business Use Cases** |  | Professional business applications |
|
|
118
|
-
| **Creative Tools** |  | Creative content generation |
|
|
119
|
-
| **Developer Tools** |  | Code generation and API docs |
|
|
120
|
-
| **Analytics & Monitoring** |  | Real-time provider analytics |
|
|
121
|
-
|
|
122
|
-
#### **🎥 Complete Demo Videos** *(Real AI generation showing SDK use cases)*
|
|
123
|
-
- **[Basic Examples WebM](./neurolink-demo/videos/basic-examples.webm) | [MP4](./neurolink-demo/videos/basic-examples.mp4)** - Core SDK functionality: text generation, streaming, provider selection, status checks
|
|
124
|
-
- **[Business Use Cases WebM](./neurolink-demo/videos/business-use-cases.webm) | [MP4](./neurolink-demo/videos/business-use-cases.mp4)** - Professional applications: marketing emails, quarterly data analysis, executive summaries
|
|
125
|
-
- **[Creative Tools WebM](./neurolink-demo/videos/creative-tools.webm) | [MP4](./neurolink-demo/videos/creative-tools.mp4)** - Content creation: storytelling, translation, blog post ideas
|
|
126
|
-
- **[Developer Tools WebM](./neurolink-demo/videos/developer-tools.webm) | [MP4](./neurolink-demo/videos/developer-tools.mp4)** - Technical applications: React components, API documentation, error debugging
|
|
127
|
-
- **[Monitoring & Analytics WebM](./neurolink-demo/videos/monitoring-analytics.webm) | [MP4](./neurolink-demo/videos/monitoring-analytics.mp4)** - SDK features: performance benchmarks, provider fallback, structured data generation
|
|
128
|
-
|
|
129
|
-
**Available formats:**
|
|
130
|
-
- **WebM** (web-optimized): All videos available as `.webm` for web embedding
|
|
131
|
-
- **MP4** (universal): All videos available as `.mp4` for desktop and mobile compatibility
|
|
132
|
-
|
|
133
|
-
### 🖥️ CLI Tool Screenshots & Videos
|
|
134
|
-
|
|
135
|
-
#### **📸 Professional CLI Screenshots** *(Latest: June 8, 2025)*
|
|
136
|
-
| Command | Screenshot | Description |
|
|
137
|
-
|---------|------------|-------------|
|
|
138
|
-
| **CLI Help Overview** |  | Complete command reference |
|
|
139
|
-
| **Provider Status Check** |  | All provider connectivity verified |
|
|
140
|
-
| **Text Generation** |  | Real AI haiku generation with JSON |
|
|
141
|
-
| **Auto Provider Selection** |  | Automatic provider selection working |
|
|
142
|
-
| **Batch Processing** |  | Multi-prompt processing with results |
|
|
143
|
-
|
|
144
|
-
#### **🎥 CLI Demonstration Videos** *(Professional H.264 MP4 format)*
|
|
145
|
-
- **[CLI Help & Overview](./docs/visual-content/cli-videos/cli-help.mp4)** (44KB) - Complete command reference and usage examples
|
|
146
|
-
- **[Provider Status Check](./docs/visual-content/cli-videos/cli-provider-status.mp4)** (496KB) - Connectivity testing and response time measurement
|
|
147
|
-
- **[Text Generation](./docs/visual-content/cli-videos/cli-text-generation.mp4)** (100KB) - Real AI content generation with different providers
|
|
148
|
-
- **[MCP Command Help](./docs/visual-content/cli-videos/mcp-help.mp4)** (36KB) - MCP server management commands
|
|
149
|
-
- **[MCP Server Listing](./docs/visual-content/cli-videos/mcp-list.mp4)** (16KB) - MCP server discovery and status
|
|
150
|
-
|
|
151
|
-
### 🔧 MCP (Model Context Protocol) Visual Documentation
|
|
152
|
-
|
|
153
|
-
#### **📸 MCP CLI Screenshots** *(Generated Jan 10, 2025)*
|
|
154
|
-
| Command | Screenshot | Description |
|
|
155
|
-
|---------|------------|-------------|
|
|
156
|
-
| **MCP Help Overview** |  | Complete MCP command reference |
|
|
157
|
-
| **Server Installation** |  | Installing external MCP servers |
|
|
158
|
-
| **Server Status Check** |  | MCP server connectivity and status |
|
|
159
|
-
| **Server Testing** |  | Testing MCP server connectivity |
|
|
160
|
-
| **Custom Server Setup** |  | Adding custom MCP server configurations |
|
|
161
|
-
| **Workflow Integration** |  | Complete MCP workflow demonstrations |
|
|
162
|
-
|
|
163
|
-
#### **🎥 MCP Demo Videos** *(Real MCP server integration)*
|
|
164
|
-
- **[Server Management WebM](./neurolink-demo/videos/mcp-demos/mcp-server-management-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-server-management-demo.mp4)** - Installing, configuring, and testing MCP servers (~45s)
|
|
165
|
-
- **[Tool Execution WebM](./neurolink-demo/videos/mcp-demos/mcp-tool-execution-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-tool-execution-demo.mp4)** - Executing tools from external MCP servers (~60s)
|
|
166
|
-
- **[Workflow Integration WebM](./neurolink-demo/videos/mcp-demos/mcp-workflow-integration-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-workflow-integration-demo.mp4)** - Complete workflow using multiple MCP servers (~90s)
|
|
167
|
-
|
|
168
|
-
**MCP Documentation**: All MCP visual content demonstrates real external server integration and tool execution capabilities.
|
|
169
|
-
|
|
170
|
-
**Video Quality**: All CLI videos now use professional H.264 encoding with universal compatibility across platforms and documentation systems.
|
|
171
|
-
|
|
172
|
-
### 💻 Live Interactive Demo
|
|
173
|
-
- **Working Express.js server** with real API integration
|
|
174
|
-
- **All 3 providers functional** (OpenAI, Bedrock, Vertex AI)
|
|
175
|
-
- **15+ use cases** demonstrated across business, creative, and developer tools
|
|
176
|
-
- **Real-time provider analytics** with performance metrics
|
|
177
|
-
|
|
178
|
-
**Access**: `cd neurolink-demo && npm start` - [📁 View complete visual documentation](./neurolink-demo/)
|
|
179
|
-
|
|
180
|
-
## 📚 Documentation
|
|
181
|
-
|
|
182
|
-
### Quick Reference
|
|
183
|
-
- **[🖥️ CLI Guide](./docs/CLI-GUIDE.md)** - Complete CLI commands, options, and examples
|
|
184
|
-
- **[🏗️ Framework Integration](./docs/FRAMEWORK-INTEGRATION.md)** - SvelteKit, Next.js, Express.js, React hooks
|
|
185
|
-
- **[🔧 Environment Variables](./docs/ENVIRONMENT-VARIABLES.md)** - Complete setup guide for all AI providers
|
|
186
|
-
- **[⚙️ Provider Configuration](./docs/PROVIDER-CONFIGURATION.md)** - OpenAI, Bedrock, Vertex AI setup guides
|
|
187
|
-
- **[📚 API Reference](./docs/API-REFERENCE.md)** - Complete TypeScript API documentation
|
|
188
|
-
- **[🎬 Visual Demos](./docs/VISUAL-DEMOS.md)** - Screenshots, videos, and interactive examples
|
|
56
|
+
**📖 [Complete Setup Guide](./docs/PROVIDER-CONFIGURATION.md)** - All providers with detailed instructions
|
|
189
57
|
|
|
190
|
-
|
|
58
|
+
## ✨ Key Features
|
|
191
59
|
|
|
192
|
-
🔄 **
|
|
193
|
-
⚡ **Automatic Fallback** -
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
60
|
+
- 🔄 **5+ AI Providers** - OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, Azure
|
|
61
|
+
- ⚡ **Automatic Fallback** - Never fail when providers are down
|
|
62
|
+
- 🖥️ **CLI + SDK** - Use from command line or integrate programmatically
|
|
63
|
+
- 🛡️ **Production Ready** - TypeScript, error handling, extracted from production
|
|
64
|
+
- 🔧 **MCP Integration** - Model Context Protocol support for extensibility
|
|
65
|
+
- 🤖 **AI Analysis Tools** - Built-in optimization and workflow assistance
|
|
198
66
|
|
|
199
|
-
##
|
|
67
|
+
## 💻 Essential Examples
|
|
200
68
|
|
|
201
|
-
###
|
|
69
|
+
### CLI Commands
|
|
202
70
|
|
|
203
71
|
```bash
|
|
204
|
-
# Text
|
|
205
|
-
npx @juspay/neurolink generate-text "Explain quantum computing"
|
|
206
|
-
npx @juspay/neurolink generate-text "Write a story" --provider openai --temperature 0.9
|
|
72
|
+
# Text generation with provider selection
|
|
73
|
+
npx @juspay/neurolink generate-text "Explain quantum computing" --provider openai
|
|
207
74
|
|
|
208
|
-
# Real-time
|
|
75
|
+
# Real-time streaming
|
|
209
76
|
npx @juspay/neurolink stream "Tell me a story about robots"
|
|
210
77
|
|
|
211
|
-
#
|
|
78
|
+
# Provider diagnostics
|
|
79
|
+
npx @juspay/neurolink status --verbose
|
|
80
|
+
|
|
81
|
+
# Batch processing
|
|
212
82
|
echo -e "Write a haiku\nExplain gravity" > prompts.txt
|
|
213
83
|
npx @juspay/neurolink batch prompts.txt --output results.json
|
|
214
|
-
|
|
215
|
-
# Provider Diagnostics
|
|
216
|
-
npx @juspay/neurolink status --verbose
|
|
217
|
-
npx @juspay/neurolink get-best-provider
|
|
218
84
|
```
|
|
219
85
|
|
|
220
|
-
###
|
|
221
|
-
|
|
222
|
-
✨ **Professional UX** - Animated spinners, colorized output, progress tracking
|
|
223
|
-
🛠️ **Developer-Friendly** - Multiple output formats, provider selection, status monitoring
|
|
224
|
-
🔧 **Automation Ready** - JSON output, exit codes, scriptable for CI/CD pipelines
|
|
225
|
-
|
|
226
|
-
**[📖 View complete CLI documentation](./docs/CLI-GUIDE.md)**
|
|
86
|
+
### SDK Integration
|
|
227
87
|
|
|
228
|
-
## 🏗️ Framework Integration
|
|
229
|
-
|
|
230
|
-
### SvelteKit
|
|
231
88
|
```typescript
|
|
232
|
-
|
|
233
|
-
|
|
89
|
+
// SvelteKit API route
|
|
234
90
|
export const POST: RequestHandler = async ({ request }) => {
|
|
235
91
|
const { message } = await request.json();
|
|
236
92
|
const provider = createBestAIProvider();
|
|
237
93
|
const result = await provider.streamText({ prompt: message });
|
|
238
94
|
return new Response(result.toReadableStream());
|
|
239
95
|
};
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
### Next.js
|
|
243
|
-
```typescript
|
|
244
|
-
import { createBestAIProvider } from '@juspay/neurolink';
|
|
245
96
|
|
|
97
|
+
// Next.js API route
|
|
246
98
|
export async function POST(request: NextRequest) {
|
|
247
99
|
const { prompt } = await request.json();
|
|
248
100
|
const provider = createBestAIProvider();
|
|
@@ -251,115 +103,76 @@ export async function POST(request: NextRequest) {
|
|
|
251
103
|
}
|
|
252
104
|
```
|
|
253
105
|
|
|
254
|
-
|
|
255
|
-
```typescript
|
|
256
|
-
import { useState } from 'react';
|
|
257
|
-
|
|
258
|
-
export function useAI() {
|
|
259
|
-
const [loading, setLoading] = useState(false);
|
|
260
|
-
|
|
261
|
-
const generate = async (prompt: string) => {
|
|
262
|
-
setLoading(true);
|
|
263
|
-
const response = await fetch('/api/ai', {
|
|
264
|
-
method: 'POST',
|
|
265
|
-
body: JSON.stringify({ prompt })
|
|
266
|
-
});
|
|
267
|
-
const data = await response.json();
|
|
268
|
-
setLoading(false);
|
|
269
|
-
return data.text;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
return { generate, loading };
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
**[📖 View complete framework integration guide](./docs/FRAMEWORK-INTEGRATION.md)**
|
|
106
|
+
## 🎬 See It In Action
|
|
277
107
|
|
|
278
|
-
|
|
108
|
+
**No installation required!** Experience NeuroLink through comprehensive visual documentation:
|
|
279
109
|
|
|
280
|
-
###
|
|
110
|
+
### 📱 Interactive Web Demo
|
|
281
111
|
```bash
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
### Amazon Bedrock (⚠️ Requires Inference Profile ARN)
|
|
286
|
-
```bash
|
|
287
|
-
export AWS_ACCESS_KEY_ID="your-access-key"
|
|
288
|
-
export AWS_SECRET_ACCESS_KEY="your-secret-key"
|
|
289
|
-
export BEDROCK_MODEL="arn:aws:bedrock:us-east-2:<account_id>:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0"
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
### Google Vertex AI (Multiple Auth Methods)
|
|
293
|
-
```bash
|
|
294
|
-
# Method 1: Service Account File
|
|
295
|
-
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
|
|
296
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
297
|
-
|
|
298
|
-
# Method 2: JSON String
|
|
299
|
-
export GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'
|
|
300
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
301
|
-
|
|
302
|
-
# Method 3: Individual Variables
|
|
303
|
-
export GOOGLE_AUTH_CLIENT_EMAIL="service-account@project.iam.gserviceaccount.com"
|
|
304
|
-
export GOOGLE_AUTH_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n..."
|
|
305
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
**[📖 View complete provider configuration guide](./docs/PROVIDER-CONFIGURATION.md)**
|
|
309
|
-
|
|
310
|
-
## 📚 API Reference
|
|
311
|
-
|
|
312
|
-
### Core Functions
|
|
313
|
-
```typescript
|
|
314
|
-
// Auto-select best provider
|
|
315
|
-
const provider = createBestAIProvider();
|
|
316
|
-
|
|
317
|
-
// Specific provider
|
|
318
|
-
const openai = AIProviderFactory.createProvider('openai', 'gpt-4o');
|
|
319
|
-
|
|
320
|
-
// With fallback
|
|
321
|
-
const { primary, fallback } = createAIProviderWithFallback('bedrock', 'openai');
|
|
112
|
+
cd neurolink-demo && node server.js
|
|
113
|
+
# Visit http://localhost:9876 for live demo
|
|
322
114
|
```
|
|
323
115
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
generateText(options: GenerateTextOptions): Promise<GenerateTextResult>;
|
|
328
|
-
streamText(options: StreamTextOptions): Promise<StreamTextResult>;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
interface GenerateTextOptions {
|
|
332
|
-
prompt: string;
|
|
333
|
-
temperature?: number; // 0.0 to 1.0, default: 0.7
|
|
334
|
-
maxTokens?: number; // Default: 500
|
|
335
|
-
systemPrompt?: string;
|
|
336
|
-
}
|
|
337
|
-
```
|
|
116
|
+
- **Real AI Integration**: All 5 providers functional with live generation
|
|
117
|
+
- **Complete Use Cases**: Business, creative, and developer scenarios
|
|
118
|
+
- **Performance Metrics**: Live provider analytics and response times
|
|
338
119
|
|
|
339
|
-
###
|
|
340
|
-
- **
|
|
341
|
-
- **
|
|
342
|
-
- **
|
|
120
|
+
### 🖥️ CLI Demonstrations
|
|
121
|
+
- **[CLI Help & Commands](./docs/visual-content/cli-videos/cli-01-cli-help.mp4)** - Complete command reference
|
|
122
|
+
- **[Provider Status Check](./docs/visual-content/cli-videos/cli-02-provider-status.mp4)** - Connectivity verification
|
|
123
|
+
- **[Text Generation](./docs/visual-content/cli-videos/cli-03-text-generation.mp4)** - Real AI content creation
|
|
343
124
|
|
|
344
|
-
|
|
125
|
+
### 🌐 Web Interface Videos
|
|
126
|
+
- **[Business Use Cases](./neurolink-demo/videos/business-use-cases.mp4)** - Professional applications
|
|
127
|
+
- **[Developer Tools](./neurolink-demo/videos/developer-tools.mp4)** - Code generation and APIs
|
|
128
|
+
- **[Creative Tools](./neurolink-demo/videos/creative-tools.mp4)** - Content creation
|
|
345
129
|
|
|
346
|
-
|
|
130
|
+
**[📖 Complete Visual Documentation](./docs/VISUAL-DEMOS.md)** - All screenshots and videos
|
|
347
131
|
|
|
348
|
-
|
|
349
|
-
- ✅ **Real AI Content** - All screenshots and videos show actual AI generation
|
|
350
|
-
- ✅ **Professional Quality** - 1920x1080 resolution suitable for documentation
|
|
351
|
-
- ✅ **Complete Coverage** - Every major feature visually documented
|
|
352
|
-
- ✅ **Production Validation** - Demonstrates real-world usage patterns
|
|
353
|
-
|
|
354
|
-
**[📖 View complete visual demonstrations](./docs/VISUAL-DEMOS.md)**
|
|
355
|
-
|
|
356
|
-
## 🚀 Getting Started
|
|
132
|
+
## 📚 Documentation
|
|
357
133
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
134
|
+
### Getting Started
|
|
135
|
+
- **[🔧 Provider Setup](./docs/PROVIDER-CONFIGURATION.md)** - Complete environment configuration
|
|
136
|
+
- **[🖥️ CLI Guide](./docs/CLI-GUIDE.md)** - All commands and options
|
|
137
|
+
- **[🏗️ SDK Integration](./docs/FRAMEWORK-INTEGRATION.md)** - Next.js, SvelteKit, React
|
|
138
|
+
- **[⚙️ Environment Variables](./docs/ENVIRONMENT-VARIABLES.md)** - Full configuration guide
|
|
139
|
+
|
|
140
|
+
### Advanced Features
|
|
141
|
+
- **[🔄 MCP Foundation](./docs/MCP-FOUNDATION.md)** - Model Context Protocol architecture
|
|
142
|
+
- **[🧠 AI Analysis Tools](./docs/AI-ANALYSIS-TOOLS.md)** - Usage optimization and benchmarking
|
|
143
|
+
- **[🛠️ AI Workflow Tools](./docs/AI-WORKFLOW-TOOLS.md)** - Development lifecycle assistance
|
|
144
|
+
- **[🎬 Visual Demos](./docs/VISUAL-DEMOS.md)** - Screenshots and videos
|
|
145
|
+
|
|
146
|
+
### Reference
|
|
147
|
+
- **[📚 API Reference](./docs/API-REFERENCE.md)** - Complete TypeScript API
|
|
148
|
+
- **[🔗 Framework Integration](./docs/FRAMEWORK-INTEGRATION.md)** - SvelteKit, Next.js, Express.js
|
|
149
|
+
|
|
150
|
+
## 🏗️ Supported Providers & Models
|
|
151
|
+
|
|
152
|
+
| Provider | Models | Auth Method | Free Tier |
|
|
153
|
+
|----------|--------|-------------|-----------|
|
|
154
|
+
| **OpenAI** | GPT-4o, GPT-4o-mini | API Key | ❌ |
|
|
155
|
+
| **Google AI Studio** | Gemini 1.5/2.0 Flash/Pro | API Key | ✅ |
|
|
156
|
+
| **Amazon Bedrock** | Claude 3.5/3.7 Sonnet | AWS Credentials | ❌ |
|
|
157
|
+
| **Google Vertex AI** | Gemini 2.5 Flash | Service Account | ❌ |
|
|
158
|
+
| **Anthropic** | Claude 3.5 Sonnet | API Key | ❌ |
|
|
159
|
+
| **Azure OpenAI** | GPT-4, GPT-3.5 | API Key + Endpoint | ❌ |
|
|
160
|
+
|
|
161
|
+
**✨ Auto-Selection**: NeuroLink automatically chooses the best available provider based on speed, reliability, and configuration.
|
|
162
|
+
|
|
163
|
+
## 🎯 Production Features
|
|
164
|
+
|
|
165
|
+
### Enterprise-Grade Reliability
|
|
166
|
+
- **Automatic Failover**: Seamless provider switching on failures
|
|
167
|
+
- **Error Recovery**: Comprehensive error handling and logging
|
|
168
|
+
- **Performance Monitoring**: Built-in analytics and metrics
|
|
169
|
+
- **Type Safety**: Full TypeScript support with IntelliSense
|
|
170
|
+
|
|
171
|
+
### AI Platform Capabilities
|
|
172
|
+
- **MCP Foundation**: Universal AI development platform with 10+ specialized tools
|
|
173
|
+
- **Analysis Tools**: Usage optimization, performance benchmarking, parameter tuning
|
|
174
|
+
- **Workflow Tools**: Test generation, code refactoring, documentation, debugging
|
|
175
|
+
- **Extensibility**: Connect external tools and services via MCP protocol
|
|
363
176
|
|
|
364
177
|
## 🤝 Contributing
|
|
365
178
|
|
|
@@ -382,7 +195,7 @@ MIT © [Juspay Technologies](https://juspay.in)
|
|
|
382
195
|
|
|
383
196
|
- [Vercel AI SDK](https://github.com/vercel/ai) - Underlying provider implementations
|
|
384
197
|
- [SvelteKit](https://kit.svelte.dev) - Web framework used in this project
|
|
385
|
-
- [
|
|
198
|
+
- [Model Context Protocol](https://modelcontextprotocol.io) - Tool integration standard
|
|
386
199
|
|
|
387
200
|
---
|
|
388
201
|
|