feat: add 'brainy cloud' super command for simplified setup
- Add new 'brainy cloud' command for one-step Brain Cloud setup - Update CLI help text to highlight Brain Cloud as primary offering - Clean up premium licensing methods - redirect to Brain Cloud - Simplify connectors README to focus on open-source interfaces - Remove quantum vault references from core brainy repo The premium features now live in the brain-cloud repository. Users can setup everything with a simple 'brainy cloud' command. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
599d32f2e0
commit
f38fa5a544
3 changed files with 206 additions and 234 deletions
|
|
@ -258,6 +258,20 @@ program
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
// ========================================
|
||||||
|
// BRAIN CLOUD SUPER COMMAND (New!)
|
||||||
|
// ========================================
|
||||||
|
|
||||||
|
program
|
||||||
|
.command('cloud')
|
||||||
|
.description('☁️ Setup Brain Cloud - AI coordination across all devices')
|
||||||
|
.option('-m, --mode <type>', 'Setup mode (free|premium)', 'interactive')
|
||||||
|
.option('-k, --key <key>', 'License key for premium features')
|
||||||
|
.option('-s, --skip-install', 'Skip Brain Jar installation')
|
||||||
|
.action(wrapInteractive(async (options) => {
|
||||||
|
await cortex.setupBrainCloud(options)
|
||||||
|
}))
|
||||||
|
|
||||||
// ========================================
|
// ========================================
|
||||||
// BRAIN JAR SPECIFIC COMMANDS (Rich UX)
|
// BRAIN JAR SPECIFIC COMMANDS (Rich UX)
|
||||||
// ========================================
|
// ========================================
|
||||||
|
|
@ -398,7 +412,10 @@ program.parse(process.argv)
|
||||||
|
|
||||||
// Show help if no command
|
// Show help if no command
|
||||||
if (!process.argv.slice(2).length) {
|
if (!process.argv.slice(2).length) {
|
||||||
console.log(chalk.cyan('🧠 Brainy - Vector + Graph Database with AI Coordination'))
|
console.log(chalk.cyan('🧠☁️ Brainy - AI Coordination Service'))
|
||||||
|
console.log('')
|
||||||
|
console.log(chalk.bold('One-Command Setup:'))
|
||||||
|
console.log(chalk.green(' brainy cloud # Setup Brain Cloud (recommended!)'))
|
||||||
console.log('')
|
console.log('')
|
||||||
console.log(chalk.bold('Quick Start:'))
|
console.log(chalk.bold('Quick Start:'))
|
||||||
console.log(' brainy init # Initialize project')
|
console.log(' brainy init # Initialize project')
|
||||||
|
|
|
||||||
|
|
@ -1,79 +1,14 @@
|
||||||
# 🧠⚛️ Brainy Connectors - Quantum Vault Integration
|
# 🧠 Brainy Connectors - Open Source Interface
|
||||||
|
|
||||||
**Premium connectors for the atomic-age vector + graph database**
|
**Standard connector interface for the Brainy ecosystem**
|
||||||
|
|
||||||
## 🔒 **Quantum Vault Access Required**
|
## 📋 Overview
|
||||||
|
|
||||||
The full implementations of Brainy's premium connectors are stored in the **Quantum Vault** (`brainy-quantum-vault`) - our secure repository for advanced atomic-age technologies.
|
This directory contains the **open source interface** that all Brainy connectors implement. These interfaces provide a standardized way to connect external data sources to your Brainy database.
|
||||||
|
|
||||||
### **Available Premium Connectors:**
|
## 🔧 Interface Definition
|
||||||
|
|
||||||
| Connector | Description | Pricing | Trial |
|
The `IConnector.ts` file defines the standard interface that all connectors must implement:
|
||||||
|-----------|-------------|---------|-------|
|
|
||||||
| 🔧 **Notion** | Sync pages, databases, and documentation | $39/month | 14 days |
|
|
||||||
| 💼 **Salesforce** | Real-time CRM sync with contacts & opportunities | $49/month | 14 days |
|
|
||||||
| 💬 **Slack** | Import channels, messages, and team data | $29/month | 7 days |
|
|
||||||
| 🎯 **Asana** | Sync tasks, projects, teams, and milestones | $44/month | 14 days |
|
|
||||||
| 🎫 **Jira** | Import tickets, projects, and workflows | $34/month | 10 days |
|
|
||||||
| 📊 **HubSpot** | Connect deals, contacts, and marketing data | $59/month | 14 days |
|
|
||||||
|
|
||||||
## 🚀 **Getting Started**
|
|
||||||
|
|
||||||
### **1. Start Your Free Trial**
|
|
||||||
```bash
|
|
||||||
# Browse available connectors
|
|
||||||
cortex license catalog
|
|
||||||
|
|
||||||
# Start free trial (no credit card required)
|
|
||||||
cortex license trial notion-connector
|
|
||||||
|
|
||||||
# Check your trial status
|
|
||||||
cortex license status
|
|
||||||
```
|
|
||||||
|
|
||||||
### **2. Access the Quantum Vault**
|
|
||||||
Once you have an active license, you'll receive access to:
|
|
||||||
- **Private npm packages** with full connector implementations
|
|
||||||
- **Documentation** with setup guides and examples
|
|
||||||
- **Priority support** from our atomic-age scientists
|
|
||||||
|
|
||||||
### **3. Install and Configure**
|
|
||||||
```typescript
|
|
||||||
import { NotionConnector } from '@soulcraft/brainy-quantum-vault'
|
|
||||||
import { BrainyData } from '@soulcraft/brainy'
|
|
||||||
|
|
||||||
const brainy = new BrainyData()
|
|
||||||
await brainy.init()
|
|
||||||
|
|
||||||
const notion = new NotionConnector({
|
|
||||||
connectorId: 'notion',
|
|
||||||
licenseKey: process.env.BRAINY_LICENSE_KEY,
|
|
||||||
credentials: {
|
|
||||||
accessToken: process.env.NOTION_ACCESS_TOKEN
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
await notion.initialize()
|
|
||||||
const result = await notion.startSync()
|
|
||||||
console.log(`Synced ${result.synced} items from Notion!`)
|
|
||||||
```
|
|
||||||
|
|
||||||
## 🔧 **Open Source Interface**
|
|
||||||
|
|
||||||
This repository contains the **open source interfaces** that all Quantum Vault connectors implement:
|
|
||||||
|
|
||||||
- **`IConnector.ts`** - Base connector interface
|
|
||||||
- **`types.ts`** - Shared type definitions
|
|
||||||
- **`utils.ts`** - Common utility functions
|
|
||||||
|
|
||||||
These interfaces allow you to:
|
|
||||||
- ✅ **Build your own connectors** using the same patterns
|
|
||||||
- ✅ **Understand the API** before purchasing
|
|
||||||
- ✅ **Contribute improvements** to the interface design
|
|
||||||
|
|
||||||
## 🏗️ **Build Your Own Connector**
|
|
||||||
|
|
||||||
Want to create a connector for a service we don't support yet?
|
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import { IConnector, ConnectorConfig, SyncResult } from './interfaces/IConnector'
|
import { IConnector, ConnectorConfig, SyncResult } from './interfaces/IConnector'
|
||||||
|
|
@ -96,36 +31,33 @@ export class MyCustomConnector implements IConnector {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## 💡 **Why Premium Connectors?**
|
## 🚀 Building Custom Connectors
|
||||||
|
|
||||||
### **🔬 Advanced Research & Development**
|
You can build your own connectors using these interfaces:
|
||||||
- Maintaining OAuth flows and API compatibility
|
|
||||||
- Handling rate limits and enterprise security
|
|
||||||
- 24/7 monitoring and automatic updates
|
|
||||||
- Priority support and bug fixes
|
|
||||||
|
|
||||||
### **⚡ Production-Ready Quality**
|
1. **Implement IConnector** - Follow the interface contract
|
||||||
- Extensive testing with real enterprise data
|
2. **Handle Authentication** - Manage your service credentials
|
||||||
- Error handling and retry logic
|
3. **Sync Data** - Pull data from your source
|
||||||
- Performance optimization at scale
|
4. **Transform** - Convert to Brainy's format
|
||||||
- Security audits and compliance
|
5. **Store** - Save to your Brainy database
|
||||||
|
|
||||||
### **🧠 Continuous Intelligence**
|
## 📦 Premium Connectors
|
||||||
- AI-powered relationship detection
|
|
||||||
- Semantic understanding of domain-specific data
|
|
||||||
- Smart deduplication and conflict resolution
|
|
||||||
- Automatic schema evolution
|
|
||||||
|
|
||||||
## 🎯 **Start Your Atomic Transformation**
|
For production-ready connectors with enterprise features, check out **Brain Cloud**:
|
||||||
|
|
||||||
Ready to unlock the full power of your data?
|
- **Notion** - Sync pages and databases
|
||||||
|
- **Salesforce** - CRM integration
|
||||||
|
- **Slack** - Team communication data
|
||||||
|
- **And more** - Coming soon
|
||||||
|
|
||||||
**[Browse Premium Connectors →](https://soulcraft-research.com/brainy/premium)**
|
Learn more at [soulcraftlabs.com/brain-cloud](https://soulcraftlabs.com/brain-cloud)
|
||||||
|
|
||||||
**[Start Free Trial →](https://soulcraft-research.com/brainy/trial)**
|
## 📚 Documentation
|
||||||
|
|
||||||
**[Contact Sales →](https://soulcraft-research.com/brainy/sales)**
|
- [Connector Development Guide](https://docs.soulcraftlabs.com/brainy/connectors)
|
||||||
|
- [API Reference](https://docs.soulcraftlabs.com/brainy/api)
|
||||||
|
- [Examples](https://github.com/soulcraft/brainy-examples)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
*"In the quantum vault, every connection becomes a pathway to atomic-age intelligence."* 🧠⚛️✨
|
*Part of the Brainy ecosystem by Soulcraft Labs*
|
||||||
|
|
@ -2593,163 +2593,59 @@ export class Cortex {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Premium Licensing System - Atomic Age Revenue Engine
|
* Premium Features - Redirect to Brain Cloud
|
||||||
*/
|
*/
|
||||||
async licenseCatalog(): Promise<void> {
|
async licenseCatalog(): Promise<void> {
|
||||||
await this.ensureInitialized()
|
console.log(boxen(
|
||||||
|
`${emojis.brain}☁️ ${colors.brain('BRAIN CLOUD PREMIUM FEATURES')}\n\n` +
|
||||||
if (!this.licensingSystem) {
|
`Premium connectors and features have moved to Brain Cloud!\n\n` +
|
||||||
console.log(colors.error('Licensing system not initialized'))
|
`${colors.accent('◆')} ${colors.dim('Setup Brain Cloud:')} ${colors.highlight('brainy cloud')}\n` +
|
||||||
return
|
`${colors.accent('◆')} ${colors.dim('Learn more:')} ${colors.highlight('https://soulcraftlabs.com/brain-cloud')}\n\n` +
|
||||||
}
|
`${colors.retro('Available Tiers:')}\n` +
|
||||||
|
`${colors.success('🫙')} Brain Jar (Free) - Local coordination\n` +
|
||||||
await this.licensingSystem.displayFeatureCatalog()
|
`${colors.success('☁️')} Brain Cloud ($19/mo) - Sync everywhere\n` +
|
||||||
|
`${colors.success('🏦')} Brain Bank ($99/mo) - Enterprise features`,
|
||||||
|
{ padding: 1, borderStyle: 'round', borderColor: '#D67441' }
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
async licenseStatus(licenseId?: string): Promise<void> {
|
async licenseStatus(licenseId?: string): Promise<void> {
|
||||||
await this.ensureInitialized()
|
console.log(colors.info('License management has moved to Brain Cloud'))
|
||||||
|
console.log(colors.dim('Run: brainy cloud'))
|
||||||
if (!this.licensingSystem) {
|
|
||||||
console.log(colors.error('Licensing system not initialized'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.licensingSystem.checkLicenseStatus(licenseId)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async licenseTrial(featureId: string, customerName?: string, customerEmail?: string): Promise<void> {
|
async licenseTrial(featureId: string, customerName?: string, customerEmail?: string): Promise<void> {
|
||||||
await this.ensureInitialized()
|
console.log(boxen(
|
||||||
|
`${emojis.sparkle} ${colors.brain('START YOUR BRAIN CLOUD TRIAL')}\n\n` +
|
||||||
if (!this.licensingSystem) {
|
`${colors.accent('◆')} ${colors.dim('14-day free trial')}\n` +
|
||||||
console.log(colors.error('Licensing system not initialized'))
|
`${colors.accent('◆')} ${colors.dim('No credit card required')}\n` +
|
||||||
return
|
`${colors.accent('◆')} ${colors.dim('Cancel anytime')}\n\n` +
|
||||||
}
|
`${colors.highlight('Run: brainy cloud')}\n\n` +
|
||||||
|
`Or visit: ${colors.accent('https://soulcraftlabs.com/brain-cloud')}`,
|
||||||
// Get customer info if not provided
|
{ padding: 1, borderStyle: 'round', borderColor: '#FFD700' }
|
||||||
if (!customerName || !customerEmail) {
|
))
|
||||||
// @ts-ignore
|
|
||||||
const prompts = (await import('prompts')).default
|
|
||||||
|
|
||||||
const response = await prompts([
|
|
||||||
{
|
|
||||||
type: 'text',
|
|
||||||
name: 'name',
|
|
||||||
message: 'Your name:',
|
|
||||||
initial: customerName || ''
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'text',
|
|
||||||
name: 'email',
|
|
||||||
message: 'Your email address:',
|
|
||||||
initial: customerEmail || '',
|
|
||||||
validate: (email: string) => email.includes('@') ? true : 'Please enter a valid email'
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
if (!response.name || !response.email) {
|
|
||||||
console.log(colors.dim('Trial activation cancelled'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
customerName = response.name
|
|
||||||
customerEmail = response.email
|
|
||||||
}
|
|
||||||
|
|
||||||
// Type guard to ensure values are strings
|
|
||||||
if (!customerName || !customerEmail) {
|
|
||||||
console.log(colors.error('Customer name and email are required'))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
const license = await this.licensingSystem.startTrial(featureId, {
|
|
||||||
name: customerName,
|
|
||||||
email: customerEmail
|
|
||||||
})
|
|
||||||
|
|
||||||
if (license) {
|
|
||||||
console.log(boxen(
|
|
||||||
`${emojis.sparkle} ${colors.brain('WELCOME TO BRAINY PREMIUM!')} ${emojis.atom}\n\n` +
|
|
||||||
`${colors.accent('◆')} ${colors.dim('Your trial is now active')}\n` +
|
|
||||||
`${colors.accent('◆')} ${colors.dim('Access premium features immediately')}\n` +
|
|
||||||
`${colors.accent('◆')} ${colors.dim('Upgrade anytime at https://soulcraft-research.com/brainy/premium')}`,
|
|
||||||
{ padding: 1, borderStyle: 'round', borderColor: '#FFD700' }
|
|
||||||
))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async licenseValidate(featureId: string): Promise<boolean> {
|
async licenseValidate(featureId: string): Promise<boolean> {
|
||||||
await this.ensureInitialized()
|
console.log(colors.info('Premium features available in Brain Cloud'))
|
||||||
|
console.log(colors.dim('Setup: brainy cloud'))
|
||||||
if (!this.licensingSystem) {
|
return false
|
||||||
console.log(colors.error('Licensing system not initialized'))
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
const result = await this.licensingSystem.validateFeature(featureId)
|
|
||||||
|
|
||||||
if (result.valid) {
|
|
||||||
console.log(colors.success(`${emojis.check} Feature '${featureId}' is licensed and available`))
|
|
||||||
|
|
||||||
if (result.expiresIn && result.expiresIn <= 7) {
|
|
||||||
console.log(colors.warning(`${emojis.warning} License expires in ${result.expiresIn} days`))
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
console.log(colors.error(`${emojis.cross} Feature '${featureId}' is not available: ${result.reason}`))
|
|
||||||
|
|
||||||
if (result.reason?.includes('No valid license')) {
|
|
||||||
console.log(colors.info(`${emojis.info} Start a free trial: cortex license trial ${featureId}`))
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a premium feature is available before using it
|
* Check if a premium feature is available
|
||||||
*/
|
*/
|
||||||
async requirePremiumFeature(featureId: string, silent: boolean = false): Promise<boolean> {
|
async requirePremiumFeature(featureId: string, silent: boolean = false): Promise<boolean> {
|
||||||
if (!this.licensingSystem) {
|
if (!silent) {
|
||||||
if (!silent) console.log(colors.error('Licensing system not initialized'))
|
console.log(boxen(
|
||||||
return false
|
`${emojis.lock} ${colors.brain('BRAIN CLOUD FEATURE')} ${emojis.atom}\n\n` +
|
||||||
|
`This feature is available in Brain Cloud!\n\n` +
|
||||||
|
`${colors.highlight('Setup: brainy cloud')}\n` +
|
||||||
|
`${colors.dim('Learn more: https://soulcraftlabs.com/brain-cloud')}`,
|
||||||
|
{ padding: 1, borderStyle: 'round', borderColor: '#D67441' }
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
const result = await this.licensingSystem.validateFeature(featureId)
|
|
||||||
|
|
||||||
if (!result.valid) {
|
|
||||||
if (!silent) {
|
|
||||||
console.log(boxen(
|
|
||||||
`${emojis.lock} ${colors.brain('PREMIUM FEATURE REQUIRED')} ${emojis.atom}\n\n` +
|
|
||||||
`${colors.accent('◆')} ${colors.dim('This feature requires a premium license')}\n` +
|
|
||||||
`${colors.accent('◆')} ${colors.dim('Reason:')} ${colors.warning(result.reason)}\n\n` +
|
|
||||||
`${colors.accent('Start free trial:')} ${colors.highlight('cortex license trial ' + featureId)}\n` +
|
|
||||||
`${colors.accent('Browse catalog:')} ${colors.highlight('cortex license catalog')}`,
|
|
||||||
{ padding: 1, borderStyle: 'round', borderColor: '#D67441' }
|
|
||||||
))
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show usage warnings if approaching limits
|
|
||||||
if (result.usage && result.license) {
|
|
||||||
const limits = result.license.limits
|
|
||||||
|
|
||||||
if (limits.apiCallsPerMonth && result.usage.apiCalls > limits.apiCallsPerMonth * 0.8) {
|
|
||||||
if (!silent) {
|
|
||||||
console.log(colors.warning(`${emojis.warning} Approaching API call limit: ${result.usage.apiCalls}/${limits.apiCallsPerMonth}`))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (limits.dataVolumeGB && result.usage.dataUsed > limits.dataVolumeGB * 0.8) {
|
|
||||||
if (!silent) {
|
|
||||||
console.log(colors.warning(`${emojis.warning} Approaching data usage limit: ${result.usage.dataUsed}GB/${limits.dataVolumeGB}GB`))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -2943,6 +2839,133 @@ export class Cortex {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Brain Cloud Super Command - One command to rule them all
|
||||||
|
*/
|
||||||
|
async setupBrainCloud(options: any): Promise<void> {
|
||||||
|
const { prompt } = await import('prompts')
|
||||||
|
const colors = this.colors
|
||||||
|
const emojis = this.emojis
|
||||||
|
|
||||||
|
console.log(boxen(
|
||||||
|
`${emojis.brain}☁️ ${colors.brain('BRAIN CLOUD SETUP')}\n\n` +
|
||||||
|
`${colors.accent('Transform your AI into a coordinated system')}\n` +
|
||||||
|
`${colors.dim('One command. Global sync. Team coordination.')}\n\n` +
|
||||||
|
`${colors.success('✅')} Install Brain Jar in Claude Desktop\n` +
|
||||||
|
`${colors.success('✅')} Configure cloud sync across devices\n` +
|
||||||
|
`${colors.success('✅')} Setup team workspaces (optional)`,
|
||||||
|
{ padding: 1, borderStyle: 'double', borderColor: '#D67441' }
|
||||||
|
))
|
||||||
|
|
||||||
|
// Interactive mode if not specified
|
||||||
|
if (options.mode === 'interactive') {
|
||||||
|
const response = await prompt([
|
||||||
|
{
|
||||||
|
type: 'select',
|
||||||
|
name: 'tier',
|
||||||
|
message: 'Choose your Brain Cloud tier:',
|
||||||
|
choices: [
|
||||||
|
{ title: '🫙 Brain Jar (Free) - Local coordination only', value: 'free' },
|
||||||
|
{ title: '☁️ Brain Cloud ($19/mo) - Sync across all devices', value: 'cloud' },
|
||||||
|
{ title: '🏦 Brain Bank ($99/mo) - Enterprise features', value: 'bank' }
|
||||||
|
],
|
||||||
|
initial: 0
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
if (!response.tier) {
|
||||||
|
console.log(colors.warning('Setup cancelled'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
options.mode = response.tier
|
||||||
|
}
|
||||||
|
|
||||||
|
const spinner = ora('Setting up Brain Cloud...').start()
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Step 1: Install Brain Jar
|
||||||
|
if (!options.skipInstall) {
|
||||||
|
spinner.text = 'Installing Brain Jar in Claude Desktop...'
|
||||||
|
await this.brainJarInstall(options.mode)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 2: Configure based on tier
|
||||||
|
if (options.mode === 'cloud' || options.mode === 'bank') {
|
||||||
|
spinner.text = 'Configuring cloud sync...'
|
||||||
|
|
||||||
|
const accountResponse = await prompt([
|
||||||
|
{
|
||||||
|
type: 'confirm',
|
||||||
|
name: 'hasAccount',
|
||||||
|
message: 'Do you have a Brain Cloud account?',
|
||||||
|
initial: false
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
if (!accountResponse.hasAccount) {
|
||||||
|
console.log('\n' + boxen(
|
||||||
|
`${emojis.sparkle} ${colors.brain('CREATE YOUR ACCOUNT')}\n\n` +
|
||||||
|
`${colors.accent('◆')} Visit: ${colors.highlight('https://soulcraftlabs.com/brain-cloud')}\n` +
|
||||||
|
`${colors.accent('◆')} Click "Start Free Trial"\n` +
|
||||||
|
`${colors.accent('◆')} Get your API key\n` +
|
||||||
|
`${colors.accent('◆')} Return here to continue setup`,
|
||||||
|
{ padding: 1, borderStyle: 'round', borderColor: '#FFD700' }
|
||||||
|
))
|
||||||
|
|
||||||
|
const keyResponse = await prompt([
|
||||||
|
{
|
||||||
|
type: 'text',
|
||||||
|
name: 'apiKey',
|
||||||
|
message: 'Enter your Brain Cloud API key:'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
if (keyResponse.apiKey) {
|
||||||
|
await this.configSet('brain-cloud.apiKey', keyResponse.apiKey, { encrypt: true })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Enable cloud sync in Brain Jar
|
||||||
|
await this.configSet('brain-jar.cloudSync', 'true', {})
|
||||||
|
await this.configSet('brain-jar.tier', options.mode, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Step 3: Start Brain Jar
|
||||||
|
spinner.text = 'Starting Brain Jar coordination...'
|
||||||
|
await this.brainJarStart({})
|
||||||
|
|
||||||
|
spinner.succeed('Brain Cloud setup complete!')
|
||||||
|
|
||||||
|
// Show success message
|
||||||
|
const tierMessages = {
|
||||||
|
free: 'Local AI coordination active',
|
||||||
|
cloud: 'Cloud sync enabled across all devices',
|
||||||
|
bank: 'Enterprise features activated'
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('\n' + boxen(
|
||||||
|
`${emojis.check}${emojis.brain} ${colors.success('BRAIN CLOUD ACTIVE!')}\n\n` +
|
||||||
|
`${colors.accent('◆')} ${colors.dim('Status:')} ${colors.success(tierMessages[options.mode as keyof typeof tierMessages])}\n` +
|
||||||
|
`${colors.accent('◆')} ${colors.dim('Claude Desktop:')} ${colors.success('Brain Jar installed')}\n` +
|
||||||
|
`${colors.accent('◆')} ${colors.dim('MCP Server:')} ${colors.success('Running')}\n\n` +
|
||||||
|
`${colors.retro('Next Steps:')}\n` +
|
||||||
|
`${colors.primary('1.')} Open Claude Desktop\n` +
|
||||||
|
`${colors.primary('2.')} Start a new conversation\n` +
|
||||||
|
`${colors.primary('3.')} Your AI now has persistent memory!\n\n` +
|
||||||
|
`${colors.dim('Dashboard:')} ${colors.highlight('brainy brain-jar dashboard')}\n` +
|
||||||
|
`${colors.dim('Status:')} ${colors.highlight('brainy status')}`,
|
||||||
|
{ padding: 1, borderStyle: 'double', borderColor: '#5FD45C' }
|
||||||
|
))
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
spinner.fail('Setup failed')
|
||||||
|
console.error(colors.error('Error:'), error.message)
|
||||||
|
|
||||||
|
console.log('\n' + colors.dim('Need help? Visit https://soulcraftlabs.com/brain-cloud/support'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper method to determine data type from file path
|
* Helper method to determine data type from file path
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue