@juspay/neurolink 1.2.4 โ 1.5.0
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 +170 -0
- package/README.md +96 -232
- package/dist/cli/commands/config.d.ts +403 -0
- package/dist/cli/commands/config.js +567 -0
- package/dist/cli/commands/mcp.d.ts +7 -0
- package/dist/cli/commands/mcp.js +434 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.js +16 -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/context-manager.d.ts +164 -0
- package/dist/mcp/context-manager.js +273 -0
- package/dist/mcp/factory.d.ts +144 -0
- package/dist/mcp/factory.js +141 -0
- package/dist/mcp/orchestrator.d.ts +170 -0
- package/dist/mcp/orchestrator.js +372 -0
- package/dist/mcp/registry.d.ts +188 -0
- package/dist/mcp/registry.js +373 -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 +10 -0
- package/dist/mcp/servers/ai-providers/ai-core-server.js +302 -0
- 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 +11 -2
- package/package.json +78 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# @juspay/neurolink
|
|
2
|
+
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- **๐ง Google AI Studio Integration**: Added Google AI Studio as 5th AI provider with Gemini models
|
|
8
|
+
- **๐ง New Provider**: Complete GoogleAIStudio provider with Gemini 1.5/2.0 Flash/Pro models
|
|
9
|
+
- **๐ Free Tier Access**: Leverage Google's generous free tier for development and testing
|
|
10
|
+
- **๐ฅ๏ธ CLI Support**: Full `--provider google-ai` integration across all commands
|
|
11
|
+
- **โก Auto-Selection**: Included in automatic provider selection algorithm
|
|
12
|
+
- **๐ Simple Setup**: Single `GOOGLE_AI_API_KEY` environment variable configuration
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **๐ Documentation Architecture Overhaul**: Complete README.md restructuring for better UX
|
|
17
|
+
- **75% Size Reduction**: Transformed from 800+ lines to ~200 lines focused on quick start
|
|
18
|
+
- **Progressive Disclosure**: Clear path from basic โ intermediate โ advanced documentation
|
|
19
|
+
- **Specialized Documentation**: Created 4 dedicated docs files for different audiences
|
|
20
|
+
- **Cross-References**: Complete navigation system between all documentation files
|
|
21
|
+
|
|
22
|
+
### New Documentation Structure
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
docs/
|
|
26
|
+
โโโ AI-ANALYSIS-TOOLS.md # AI optimization and analysis tools
|
|
27
|
+
โโโ AI-WORKFLOW-TOOLS.md # Development lifecycle tools
|
|
28
|
+
โโโ MCP-FOUNDATION.md # Technical MCP architecture
|
|
29
|
+
โโโ GOOGLE-AI-STUDIO-INTEGRATION-ARCHIVE.md # Integration details
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Google AI Studio Provider
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// New Google AI Studio usage
|
|
36
|
+
import { createBestAIProvider } from '@juspay/neurolink';
|
|
37
|
+
|
|
38
|
+
const provider = createBestAIProvider(); // Auto-includes Google AI Studio
|
|
39
|
+
const result = await provider.generateText("Hello, Gemini!");
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Quick setup with Google AI Studio (free tier)
|
|
44
|
+
export GOOGLE_AI_API_KEY="AIza-your-google-ai-key"
|
|
45
|
+
npx @juspay/neurolink generate-text "Hello, AI!" --provider google-ai
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Enhanced Visual Content
|
|
49
|
+
|
|
50
|
+
- **Google AI Studio Demos**: Complete visual documentation for new provider
|
|
51
|
+
- **CLI Demonstrations**: Updated CLI videos showing google-ai provider
|
|
52
|
+
- **Professional Quality**: 6 new videos and asciinema recordings
|
|
53
|
+
|
|
54
|
+
### Technical Implementation
|
|
55
|
+
|
|
56
|
+
- **Provider Integration**: `src/lib/providers/googleAIStudio.ts`
|
|
57
|
+
- **Models Supported**: Gemini 1.5 Pro/Flash, Gemini 2.0 Flash/Pro
|
|
58
|
+
- **Authentication**: Simple API key authentication via Google AI Studio
|
|
59
|
+
- **Testing**: Complete test coverage including provider and CLI tests
|
|
60
|
+
|
|
61
|
+
### Breaking Changes
|
|
62
|
+
|
|
63
|
+
- None - 100% backward compatibility maintained
|
|
64
|
+
|
|
65
|
+
## 1.4.0
|
|
66
|
+
|
|
67
|
+
### Major Changes
|
|
68
|
+
|
|
69
|
+
- **๐ MCP Documentation Master Plan**: Complete external server connectivity documentation
|
|
70
|
+
- **๐ง MCP Integration Guide**: 400+ line comprehensive setup and usage guide
|
|
71
|
+
- **๐ CLI Documentation**: Complete MCP commands section with workflows
|
|
72
|
+
- **๐งช Demo Integration**: 5 MCP API endpoints for testing and demonstration
|
|
73
|
+
- **โ๏ธ Configuration Templates**: .env.example and .mcp-servers.example.json
|
|
74
|
+
- **๐ API Reference**: Complete MCP API documentation with examples
|
|
75
|
+
|
|
76
|
+
### Features
|
|
77
|
+
|
|
78
|
+
- **External Server Connectivity**: Full MCP (Model Context Protocol) support
|
|
79
|
+
- **65+ Compatible Servers**: Filesystem, GitHub, databases, web browsing, search
|
|
80
|
+
- **Professional CLI**: Complete server lifecycle management
|
|
81
|
+
- **Demo Server Integration**: Live MCP API endpoints
|
|
82
|
+
- **Configuration Management**: Templates and examples for all deployment scenarios
|
|
83
|
+
|
|
84
|
+
### MCP Server Support
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Install and manage external servers
|
|
88
|
+
neurolink mcp install filesystem
|
|
89
|
+
neurolink mcp install github
|
|
90
|
+
neurolink mcp test filesystem
|
|
91
|
+
neurolink mcp list --status
|
|
92
|
+
neurolink mcp execute filesystem read_file --path="/path/to/file"
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### MCP API Endpoints
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
// Demo server includes 5 MCP endpoints
|
|
99
|
+
GET /api/mcp/servers # List configured servers
|
|
100
|
+
POST /api/mcp/test/:server # Test server connectivity
|
|
101
|
+
GET /api/mcp/tools/:server # Get available tools
|
|
102
|
+
POST /api/mcp/execute # Execute MCP tools
|
|
103
|
+
POST /api/mcp/install/:server # Install new servers
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Documentation Updates
|
|
107
|
+
|
|
108
|
+
- **README.md**: Complete MCP section with real-world examples
|
|
109
|
+
- **docs/MCP-INTEGRATION.md**: 400+ line comprehensive MCP guide
|
|
110
|
+
- **docs/CLI-GUIDE.md**: MCP commands section with workflow examples
|
|
111
|
+
- **docs/API-REFERENCE.md**: Complete MCP API documentation
|
|
112
|
+
- **docs/README.md**: Updated documentation index with MCP references
|
|
113
|
+
|
|
114
|
+
### Configuration
|
|
115
|
+
|
|
116
|
+
- **.env.example**: MCP environment variables section
|
|
117
|
+
- **.mcp-servers.example.json**: Complete server configuration template
|
|
118
|
+
- **package.json**: Updated description highlighting MCP capabilities
|
|
119
|
+
|
|
120
|
+
### Breaking Changes
|
|
121
|
+
|
|
122
|
+
- None - 100% backward compatibility maintained
|
|
123
|
+
|
|
124
|
+
## 1.3.0
|
|
125
|
+
|
|
126
|
+
### Major Changes
|
|
127
|
+
|
|
128
|
+
- **๐ MCP Foundation (Model Context Protocol)**: NeuroLink transforms from AI SDK to Universal AI Development Platform
|
|
129
|
+
- **๐ญ MCP Server Factory**: Lighthouse-compatible server creation with `createMCPServer()`
|
|
130
|
+
- **๐ง Context Management**: Rich context with 15+ fields + tool chain tracking
|
|
131
|
+
- **๐ Tool Registry**: Discovery, registration, execution + statistics
|
|
132
|
+
- **๐ผ Tool Orchestration**: Single tools + sequential pipelines + error handling
|
|
133
|
+
- **๐ค AI Provider Integration**: Core AI tools with schema validation
|
|
134
|
+
- **๐ Integration Tests**: 27/27 tests passing (100% success rate)
|
|
135
|
+
|
|
136
|
+
### Features
|
|
137
|
+
|
|
138
|
+
- **Factory-First Architecture**: MCP tools work internally, users see simple factory methods
|
|
139
|
+
- **Lighthouse Compatible**: 99% compatible with existing Lighthouse MCP patterns
|
|
140
|
+
- **Enterprise Ready**: Rich context, permissions, tool orchestration, analytics
|
|
141
|
+
- **Production Tested**: <1ms tool execution, comprehensive error handling
|
|
142
|
+
|
|
143
|
+
### Performance
|
|
144
|
+
|
|
145
|
+
- **Test Execution**: 1.23s for 27 comprehensive tests
|
|
146
|
+
- **Tool Execution**: 0-11ms per tool (well under 100ms target)
|
|
147
|
+
- **Pipeline Performance**: 22ms for 2-step sequential pipeline
|
|
148
|
+
- **Memory Efficiency**: Clean context management with automatic cleanup
|
|
149
|
+
|
|
150
|
+
### Technical Implementation
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
src/lib/mcp/
|
|
154
|
+
โโโ factory.ts # createMCPServer() - Lighthouse compatible
|
|
155
|
+
โโโ context-manager.ts # Rich context (15+ fields) + tool chain tracking
|
|
156
|
+
โโโ registry.ts # Tool discovery, registration, execution + statistics
|
|
157
|
+
โโโ orchestrator.ts # Single tools + sequential pipelines + error handling
|
|
158
|
+
โโโ servers/ai-providers/ # AI Core Server with 3 tools integrated
|
|
159
|
+
โโโ ai-core-server.ts # generate-text, select-provider, check-provider-status
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Breaking Changes
|
|
163
|
+
|
|
164
|
+
- None - 100% backward compatibility maintained
|
|
165
|
+
|
|
166
|
+
## 1.2.4
|
|
167
|
+
|
|
168
|
+
### Patch Changes
|
|
169
|
+
|
|
170
|
+
- 95d8ee6: Set up automated version bumping and publishing workflow with changesets integration
|
package/README.md
CHANGED
|
@@ -4,35 +4,35 @@
|
|
|
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**
|
|
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.
|
|
10
10
|
|
|
11
11
|
## ๐ Quick Start
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Install & Run (2 minutes)
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
#
|
|
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
|
|
17
20
|
npx @juspay/neurolink generate-text "Hello, AI!"
|
|
18
21
|
npx @juspay/neurolink status
|
|
19
22
|
|
|
20
|
-
# Global CLI Installation
|
|
21
|
-
npm install -g @juspay/neurolink
|
|
22
|
-
neurolink generate-text "Write a haiku about programming"
|
|
23
|
-
|
|
24
23
|
# SDK Installation
|
|
25
|
-
npm install @juspay/neurolink
|
|
24
|
+
npm install @juspay/neurolink
|
|
26
25
|
```
|
|
27
26
|
|
|
28
|
-
###
|
|
27
|
+
### Basic Usage
|
|
28
|
+
|
|
29
29
|
```typescript
|
|
30
30
|
import { createBestAIProvider } from '@juspay/neurolink';
|
|
31
31
|
|
|
32
32
|
// Auto-selects best available provider
|
|
33
33
|
const provider = createBestAIProvider();
|
|
34
34
|
const result = await provider.generateText({
|
|
35
|
-
prompt: "
|
|
35
|
+
prompt: "Write a haiku about programming"
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
console.log(result.text);
|
|
@@ -40,156 +40,59 @@ console.log(`Used: ${result.provider}`);
|
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
### Environment Setup
|
|
43
|
+
|
|
43
44
|
```bash
|
|
44
|
-
# Create .env file (automatically loaded by CLI)
|
|
45
|
-
# OpenAI
|
|
45
|
+
# Create .env file (automatically loaded by CLI)
|
|
46
46
|
echo 'OPENAI_API_KEY="sk-your-openai-key"' > .env
|
|
47
|
-
echo '
|
|
48
|
-
|
|
49
|
-
# Amazon Bedrock
|
|
47
|
+
echo 'GOOGLE_AI_API_KEY="AIza-your-google-ai-key"' >> .env
|
|
50
48
|
echo 'AWS_ACCESS_KEY_ID="your-aws-access-key"' >> .env
|
|
51
|
-
echo 'AWS_SECRET_ACCESS_KEY="your-aws-secret-key"' >> .env
|
|
52
|
-
echo 'AWS_REGION="us-east-1"' >> .env
|
|
53
|
-
echo 'BEDROCK_MODEL="arn:aws:bedrock:region:account:inference-profile/model"' >> .env
|
|
54
|
-
|
|
55
|
-
# Google Vertex AI
|
|
56
|
-
echo 'GOOGLE_VERTEX_PROJECT="your-project-id"' >> .env
|
|
57
|
-
echo 'GOOGLE_VERTEX_LOCATION="us-central1"' >> .env
|
|
58
|
-
echo 'GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"' >> .env
|
|
59
|
-
|
|
60
|
-
# Anthropic
|
|
61
|
-
echo 'ANTHROPIC_API_KEY="sk-ant-api03-your-key"' >> .env
|
|
62
49
|
|
|
63
|
-
#
|
|
64
|
-
echo 'AZURE_OPENAI_API_KEY="your-azure-key"' >> .env
|
|
65
|
-
echo 'AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/"' >> .env
|
|
66
|
-
echo 'AZURE_OPENAI_DEPLOYMENT_ID="your-deployment-name"' >> .env
|
|
67
|
-
|
|
68
|
-
# Test configuration (automatically loads .env)
|
|
50
|
+
# Test configuration
|
|
69
51
|
npx @juspay/neurolink status
|
|
70
52
|
```
|
|
71
53
|
|
|
72
|
-
**๐ [Complete
|
|
73
|
-
|
|
74
|
-
## ๐ฌ Complete Visual Documentation
|
|
75
|
-
|
|
76
|
-
**No installation required!** Experience NeuroLink's capabilities through our comprehensive visual ecosystem:
|
|
77
|
-
|
|
78
|
-
### ๐ Web Demo Screenshots & Videos
|
|
79
|
-
|
|
80
|
-
#### **๐ธ Interactive Web Interface Screenshots**
|
|
81
|
-
| Feature | Screenshot | Description |
|
|
82
|
-
|---------|------------|-------------|
|
|
83
|
-
| **Main Interface** |  | Complete web interface showing all features |
|
|
84
|
-
| **AI Generation Results** |  | Real AI content generation in action |
|
|
85
|
-
| **Business Use Cases** |  | Professional business applications |
|
|
86
|
-
| **Creative Tools** |  | Creative content generation |
|
|
87
|
-
| **Developer Tools** |  | Code generation and API docs |
|
|
88
|
-
| **Analytics & Monitoring** |  | Real-time provider analytics |
|
|
89
|
-
|
|
90
|
-
#### **๐ฅ Complete Demo Videos** *(Real AI generation showing SDK use cases)*
|
|
91
|
-
- **[Basic Examples](./neurolink-demo/videos/basic-examples.webm)** - Core SDK functionality: text generation, streaming, provider selection, status checks
|
|
92
|
-
- **[Business Use Cases](./neurolink-demo/videos/business-use-cases.webm)** - Professional applications: marketing emails, quarterly data analysis, executive summaries
|
|
93
|
-
- **[Creative Tools](./neurolink-demo/videos/creative-tools.webm)** - Content creation: storytelling, translation, blog post ideas
|
|
94
|
-
- **[Developer Tools](./neurolink-demo/videos/developer-tools.webm)** - Technical applications: React components, API documentation, error debugging
|
|
95
|
-
- **[Monitoring & Analytics](./neurolink-demo/videos/monitoring-analytics.webm)** - SDK features: performance benchmarks, provider fallback, structured data generation
|
|
96
|
-
|
|
97
|
-
**Available formats:**
|
|
98
|
-
- **WebM** (web-optimized): All videos available as `.webm` for web embedding
|
|
99
|
-
- **MP4** (universal): All videos available as `.mp4` for desktop and mobile compatibility
|
|
100
|
-
|
|
101
|
-
### ๐ฅ๏ธ CLI Tool Screenshots & Videos
|
|
102
|
-
|
|
103
|
-
#### **๐ธ Professional CLI Screenshots**
|
|
104
|
-
| Command | Screenshot | Description |
|
|
105
|
-
|---------|------------|-------------|
|
|
106
|
-
| **CLI Help Overview** |  | Complete command reference |
|
|
107
|
-
| **Provider Status Check** |  | All provider connectivity verified |
|
|
108
|
-
| **Text Generation** |  | Real AI haiku generation with JSON |
|
|
109
|
-
| **Auto Provider Selection** |  | Automatic provider selection working |
|
|
110
|
-
| **Batch Processing** |  | Multi-prompt processing with results |
|
|
111
|
-
|
|
112
|
-
#### **๐ฅ CLI Demonstration Videos** *(Real command execution)*
|
|
113
|
-
- **[CLI Overview](./docs/visual-content/videos/cli-videos/cli-overview/)** - Help, status, provider selection commands
|
|
114
|
-
- **[Basic Generation](./docs/visual-content/videos/cli-videos/cli-basic-generation/)** - Text generation with different providers
|
|
115
|
-
- **[Batch Processing](./docs/visual-content/videos/cli-videos/cli-batch-processing/)** - File-based multi-prompt processing
|
|
116
|
-
- **[Real-time Streaming](./docs/visual-content/videos/cli-videos/cli-streaming/)** - Live AI content streaming
|
|
117
|
-
- **[Advanced Features](./docs/visual-content/videos/cli-videos/cli-advanced-features/)** - Verbose diagnostics and provider options
|
|
118
|
-
|
|
119
|
-
### ๐ป Live Interactive Demo
|
|
120
|
-
- **Working Express.js server** with real API integration
|
|
121
|
-
- **All 3 providers functional** (OpenAI, Bedrock, Vertex AI)
|
|
122
|
-
- **15+ use cases** demonstrated across business, creative, and developer tools
|
|
123
|
-
- **Real-time provider analytics** with performance metrics
|
|
124
|
-
|
|
125
|
-
**Access**: `cd neurolink-demo && npm start` - [๐ View complete visual documentation](./neurolink-demo/)
|
|
126
|
-
|
|
127
|
-
## ๐ Documentation
|
|
128
|
-
|
|
129
|
-
### Quick Reference
|
|
130
|
-
- **[๐ฅ๏ธ CLI Guide](./docs/CLI-GUIDE.md)** - Complete CLI commands, options, and examples
|
|
131
|
-
- **[๐๏ธ Framework Integration](./docs/FRAMEWORK-INTEGRATION.md)** - SvelteKit, Next.js, Express.js, React hooks
|
|
132
|
-
- **[๐ง Environment Variables](./docs/ENVIRONMENT-VARIABLES.md)** - Complete setup guide for all AI providers
|
|
133
|
-
- **[โ๏ธ Provider Configuration](./docs/PROVIDER-CONFIGURATION.md)** - OpenAI, Bedrock, Vertex AI setup guides
|
|
134
|
-
- **[๐ API Reference](./docs/API-REFERENCE.md)** - Complete TypeScript API documentation
|
|
135
|
-
- **[๐ฌ Visual Demos](./docs/VISUAL-DEMOS.md)** - Screenshots, videos, and interactive examples
|
|
54
|
+
**๐ [Complete Setup Guide](./docs/PROVIDER-CONFIGURATION.md)** - All providers with detailed instructions
|
|
136
55
|
|
|
137
|
-
|
|
56
|
+
## โจ Key Features
|
|
138
57
|
|
|
139
|
-
๐ **
|
|
140
|
-
โก **Automatic Fallback** -
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
58
|
+
- ๐ **5+ AI Providers** - OpenAI, Bedrock, Vertex AI, Google AI Studio, Anthropic, Azure
|
|
59
|
+
- โก **Automatic Fallback** - Never fail when providers are down
|
|
60
|
+
- ๐ฅ๏ธ **CLI + SDK** - Use from command line or integrate programmatically
|
|
61
|
+
- ๐ก๏ธ **Production Ready** - TypeScript, error handling, extracted from production
|
|
62
|
+
- ๐ง **MCP Integration** - Model Context Protocol support for extensibility
|
|
63
|
+
- ๐ค **AI Analysis Tools** - Built-in optimization and workflow assistance
|
|
145
64
|
|
|
146
|
-
##
|
|
65
|
+
## ๐ป Essential Examples
|
|
147
66
|
|
|
148
|
-
###
|
|
67
|
+
### CLI Commands
|
|
149
68
|
|
|
150
69
|
```bash
|
|
151
|
-
# Text
|
|
152
|
-
npx @juspay/neurolink generate-text "Explain quantum computing"
|
|
153
|
-
npx @juspay/neurolink generate-text "Write a story" --provider openai --temperature 0.9
|
|
70
|
+
# Text generation with provider selection
|
|
71
|
+
npx @juspay/neurolink generate-text "Explain quantum computing" --provider openai
|
|
154
72
|
|
|
155
|
-
# Real-time
|
|
73
|
+
# Real-time streaming
|
|
156
74
|
npx @juspay/neurolink stream "Tell me a story about robots"
|
|
157
75
|
|
|
158
|
-
#
|
|
76
|
+
# Provider diagnostics
|
|
77
|
+
npx @juspay/neurolink status --verbose
|
|
78
|
+
|
|
79
|
+
# Batch processing
|
|
159
80
|
echo -e "Write a haiku\nExplain gravity" > prompts.txt
|
|
160
81
|
npx @juspay/neurolink batch prompts.txt --output results.json
|
|
161
|
-
|
|
162
|
-
# Provider Diagnostics
|
|
163
|
-
npx @juspay/neurolink status --verbose
|
|
164
|
-
npx @juspay/neurolink get-best-provider
|
|
165
82
|
```
|
|
166
83
|
|
|
167
|
-
###
|
|
168
|
-
|
|
169
|
-
โจ **Professional UX** - Animated spinners, colorized output, progress tracking
|
|
170
|
-
๐ ๏ธ **Developer-Friendly** - Multiple output formats, provider selection, status monitoring
|
|
171
|
-
๐ง **Automation Ready** - JSON output, exit codes, scriptable for CI/CD pipelines
|
|
84
|
+
### SDK Integration
|
|
172
85
|
|
|
173
|
-
**[๐ View complete CLI documentation](./docs/CLI-GUIDE.md)**
|
|
174
|
-
|
|
175
|
-
## ๐๏ธ Framework Integration
|
|
176
|
-
|
|
177
|
-
### SvelteKit
|
|
178
86
|
```typescript
|
|
179
|
-
|
|
180
|
-
|
|
87
|
+
// SvelteKit API route
|
|
181
88
|
export const POST: RequestHandler = async ({ request }) => {
|
|
182
89
|
const { message } = await request.json();
|
|
183
90
|
const provider = createBestAIProvider();
|
|
184
91
|
const result = await provider.streamText({ prompt: message });
|
|
185
92
|
return new Response(result.toReadableStream());
|
|
186
93
|
};
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Next.js
|
|
190
|
-
```typescript
|
|
191
|
-
import { createBestAIProvider } from '@juspay/neurolink';
|
|
192
94
|
|
|
95
|
+
// Next.js API route
|
|
193
96
|
export async function POST(request: NextRequest) {
|
|
194
97
|
const { prompt } = await request.json();
|
|
195
98
|
const provider = createBestAIProvider();
|
|
@@ -198,115 +101,76 @@ export async function POST(request: NextRequest) {
|
|
|
198
101
|
}
|
|
199
102
|
```
|
|
200
103
|
|
|
201
|
-
|
|
202
|
-
```typescript
|
|
203
|
-
import { useState } from 'react';
|
|
204
|
-
|
|
205
|
-
export function useAI() {
|
|
206
|
-
const [loading, setLoading] = useState(false);
|
|
207
|
-
|
|
208
|
-
const generate = async (prompt: string) => {
|
|
209
|
-
setLoading(true);
|
|
210
|
-
const response = await fetch('/api/ai', {
|
|
211
|
-
method: 'POST',
|
|
212
|
-
body: JSON.stringify({ prompt })
|
|
213
|
-
});
|
|
214
|
-
const data = await response.json();
|
|
215
|
-
setLoading(false);
|
|
216
|
-
return data.text;
|
|
217
|
-
};
|
|
218
|
-
|
|
219
|
-
return { generate, loading };
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
**[๐ View complete framework integration guide](./docs/FRAMEWORK-INTEGRATION.md)**
|
|
104
|
+
## ๐ฌ See It In Action
|
|
224
105
|
|
|
225
|
-
|
|
106
|
+
**No installation required!** Experience NeuroLink through comprehensive visual documentation:
|
|
226
107
|
|
|
227
|
-
###
|
|
108
|
+
### ๐ฑ Interactive Web Demo
|
|
228
109
|
```bash
|
|
229
|
-
|
|
110
|
+
cd neurolink-demo && node server.js
|
|
111
|
+
# Visit http://localhost:9876 for live demo
|
|
230
112
|
```
|
|
231
113
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
export AWS_SECRET_ACCESS_KEY="your-secret-key"
|
|
236
|
-
export BEDROCK_MODEL="arn:aws:bedrock:us-east-2:<account_id>:inference-profile/us.anthropic.claude-3-7-sonnet-20250219-v1:0"
|
|
237
|
-
```
|
|
114
|
+
- **Real AI Integration**: All 5 providers functional with live generation
|
|
115
|
+
- **Complete Use Cases**: Business, creative, and developer scenarios
|
|
116
|
+
- **Performance Metrics**: Live provider analytics and response times
|
|
238
117
|
|
|
239
|
-
###
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
244
|
-
|
|
245
|
-
# Method 2: JSON String
|
|
246
|
-
export GOOGLE_SERVICE_ACCOUNT_KEY='{"type":"service_account",...}'
|
|
247
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
248
|
-
|
|
249
|
-
# Method 3: Individual Variables
|
|
250
|
-
export GOOGLE_AUTH_CLIENT_EMAIL="service-account@project.iam.gserviceaccount.com"
|
|
251
|
-
export GOOGLE_AUTH_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n..."
|
|
252
|
-
export GOOGLE_VERTEX_PROJECT="your-project-id"
|
|
253
|
-
```
|
|
118
|
+
### ๐ฅ๏ธ CLI Demonstrations
|
|
119
|
+
- **[CLI Help & Commands](./docs/visual-content/cli-videos/cli-01-cli-help.mp4)** - Complete command reference
|
|
120
|
+
- **[Provider Status Check](./docs/visual-content/cli-videos/cli-02-provider-status.mp4)** - Connectivity verification
|
|
121
|
+
- **[Text Generation](./docs/visual-content/cli-videos/cli-03-text-generation.mp4)** - Real AI content creation
|
|
254
122
|
|
|
255
|
-
|
|
123
|
+
### ๐ Web Interface Videos
|
|
124
|
+
- **[Business Use Cases](./neurolink-demo/videos/business-use-cases.mp4)** - Professional applications
|
|
125
|
+
- **[Developer Tools](./neurolink-demo/videos/developer-tools.mp4)** - Code generation and APIs
|
|
126
|
+
- **[Creative Tools](./neurolink-demo/videos/creative-tools.mp4)** - Content creation
|
|
256
127
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
### Core Functions
|
|
260
|
-
```typescript
|
|
261
|
-
// Auto-select best provider
|
|
262
|
-
const provider = createBestAIProvider();
|
|
263
|
-
|
|
264
|
-
// Specific provider
|
|
265
|
-
const openai = AIProviderFactory.createProvider('openai', 'gpt-4o');
|
|
266
|
-
|
|
267
|
-
// With fallback
|
|
268
|
-
const { primary, fallback } = createAIProviderWithFallback('bedrock', 'openai');
|
|
269
|
-
```
|
|
128
|
+
**[๐ Complete Visual Documentation](./docs/VISUAL-DEMOS.md)** - All screenshots and videos
|
|
270
129
|
|
|
271
|
-
|
|
272
|
-
```typescript
|
|
273
|
-
interface AIProvider {
|
|
274
|
-
generateText(options: GenerateTextOptions): Promise<GenerateTextResult>;
|
|
275
|
-
streamText(options: StreamTextOptions): Promise<StreamTextResult>;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
interface GenerateTextOptions {
|
|
279
|
-
prompt: string;
|
|
280
|
-
temperature?: number; // 0.0 to 1.0, default: 0.7
|
|
281
|
-
maxTokens?: number; // Default: 500
|
|
282
|
-
systemPrompt?: string;
|
|
283
|
-
}
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
### Supported Models
|
|
287
|
-
- **OpenAI**: `gpt-4o` (default), `gpt-4o-mini`, `gpt-4-turbo`
|
|
288
|
-
- **Bedrock**: `claude-3-7-sonnet` (default), `claude-3-5-sonnet`, `claude-3-haiku`
|
|
289
|
-
- **Vertex AI**: `gemini-2.5-flash` (default), `claude-sonnet-4@20250514`
|
|
290
|
-
|
|
291
|
-
**[๐ View complete API reference](./docs/API-REFERENCE.md)**
|
|
292
|
-
|
|
293
|
-
## ๐ฏ Visual Content Benefits
|
|
294
|
-
|
|
295
|
-
- โ
**No Installation Required** - See everything in action before installing
|
|
296
|
-
- โ
**Real AI Content** - All screenshots and videos show actual AI generation
|
|
297
|
-
- โ
**Professional Quality** - 1920x1080 resolution suitable for documentation
|
|
298
|
-
- โ
**Complete Coverage** - Every major feature visually documented
|
|
299
|
-
- โ
**Production Validation** - Demonstrates real-world usage patterns
|
|
300
|
-
|
|
301
|
-
**[๐ View complete visual demonstrations](./docs/VISUAL-DEMOS.md)**
|
|
302
|
-
|
|
303
|
-
## ๐ Getting Started
|
|
130
|
+
## ๐ Documentation
|
|
304
131
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
132
|
+
### Getting Started
|
|
133
|
+
- **[๐ง Provider Setup](./docs/PROVIDER-CONFIGURATION.md)** - Complete environment configuration
|
|
134
|
+
- **[๐ฅ๏ธ CLI Guide](./docs/CLI-GUIDE.md)** - All commands and options
|
|
135
|
+
- **[๐๏ธ SDK Integration](./docs/FRAMEWORK-INTEGRATION.md)** - Next.js, SvelteKit, React
|
|
136
|
+
- **[โ๏ธ Environment Variables](./docs/ENVIRONMENT-VARIABLES.md)** - Full configuration guide
|
|
137
|
+
|
|
138
|
+
### Advanced Features
|
|
139
|
+
- **[๐ MCP Foundation](./docs/MCP-FOUNDATION.md)** - Model Context Protocol architecture
|
|
140
|
+
- **[๐ง AI Analysis Tools](./docs/AI-ANALYSIS-TOOLS.md)** - Usage optimization and benchmarking
|
|
141
|
+
- **[๐ ๏ธ AI Workflow Tools](./docs/AI-WORKFLOW-TOOLS.md)** - Development lifecycle assistance
|
|
142
|
+
- **[๐ฌ Visual Demos](./docs/VISUAL-DEMOS.md)** - Screenshots and videos
|
|
143
|
+
|
|
144
|
+
### Reference
|
|
145
|
+
- **[๐ API Reference](./docs/API-REFERENCE.md)** - Complete TypeScript API
|
|
146
|
+
- **[๐ Framework Integration](./docs/FRAMEWORK-INTEGRATION.md)** - SvelteKit, Next.js, Express.js
|
|
147
|
+
|
|
148
|
+
## ๐๏ธ Supported Providers & Models
|
|
149
|
+
|
|
150
|
+
| Provider | Models | Auth Method | Free Tier |
|
|
151
|
+
|----------|--------|-------------|-----------|
|
|
152
|
+
| **OpenAI** | GPT-4o, GPT-4o-mini | API Key | โ |
|
|
153
|
+
| **Google AI Studio** | Gemini 1.5/2.0 Flash/Pro | API Key | โ
|
|
|
154
|
+
| **Amazon Bedrock** | Claude 3.5/3.7 Sonnet | AWS Credentials | โ |
|
|
155
|
+
| **Google Vertex AI** | Gemini 2.5 Flash | Service Account | โ |
|
|
156
|
+
| **Anthropic** | Claude 3.5 Sonnet | API Key | โ |
|
|
157
|
+
| **Azure OpenAI** | GPT-4, GPT-3.5 | API Key + Endpoint | โ |
|
|
158
|
+
|
|
159
|
+
**โจ Auto-Selection**: NeuroLink automatically chooses the best available provider based on speed, reliability, and configuration.
|
|
160
|
+
|
|
161
|
+
## ๐ฏ Production Features
|
|
162
|
+
|
|
163
|
+
### Enterprise-Grade Reliability
|
|
164
|
+
- **Automatic Failover**: Seamless provider switching on failures
|
|
165
|
+
- **Error Recovery**: Comprehensive error handling and logging
|
|
166
|
+
- **Performance Monitoring**: Built-in analytics and metrics
|
|
167
|
+
- **Type Safety**: Full TypeScript support with IntelliSense
|
|
168
|
+
|
|
169
|
+
### AI Platform Capabilities
|
|
170
|
+
- **MCP Foundation**: Universal AI development platform with 10+ specialized tools
|
|
171
|
+
- **Analysis Tools**: Usage optimization, performance benchmarking, parameter tuning
|
|
172
|
+
- **Workflow Tools**: Test generation, code refactoring, documentation, debugging
|
|
173
|
+
- **Extensibility**: Connect external tools and services via MCP protocol
|
|
310
174
|
|
|
311
175
|
## ๐ค Contributing
|
|
312
176
|
|
|
@@ -329,7 +193,7 @@ MIT ยฉ [Juspay Technologies](https://juspay.in)
|
|
|
329
193
|
|
|
330
194
|
- [Vercel AI SDK](https://github.com/vercel/ai) - Underlying provider implementations
|
|
331
195
|
- [SvelteKit](https://kit.svelte.dev) - Web framework used in this project
|
|
332
|
-
- [
|
|
196
|
+
- [Model Context Protocol](https://modelcontextprotocol.io) - Tool integration standard
|
|
333
197
|
|
|
334
198
|
---
|
|
335
199
|
|