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:
David Snelling 2025-08-09 08:24:11 -07:00
parent 682e152b98
commit ede8dd3ae4
3 changed files with 206 additions and 234 deletions

View file

@ -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)
// ========================================
@ -398,7 +412,10 @@ program.parse(process.argv)
// Show help if no command
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(chalk.bold('Quick Start:'))
console.log(' brainy init # Initialize project')

View file

@ -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 |
|-----------|-------------|---------|-------|
| 🔧 **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?
The `IConnector.ts` file defines the standard interface that all connectors must implement:
```typescript
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**
- Maintaining OAuth flows and API compatibility
- Handling rate limits and enterprise security
- 24/7 monitoring and automatic updates
- Priority support and bug fixes
You can build your own connectors using these interfaces:
### **⚡ Production-Ready Quality**
- Extensive testing with real enterprise data
- Error handling and retry logic
- Performance optimization at scale
- Security audits and compliance
1. **Implement IConnector** - Follow the interface contract
2. **Handle Authentication** - Manage your service credentials
3. **Sync Data** - Pull data from your source
4. **Transform** - Convert to Brainy's format
5. **Store** - Save to your Brainy database
### **🧠 Continuous Intelligence**
- AI-powered relationship detection
- Semantic understanding of domain-specific data
- Smart deduplication and conflict resolution
- Automatic schema evolution
## 📦 Premium Connectors
## 🎯 **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*

View file

@ -2593,163 +2593,59 @@ export class Cortex {
}
/**
* Premium Licensing System - Atomic Age Revenue Engine
* Premium Features - Redirect to Brain Cloud
*/
async licenseCatalog(): Promise<void> {
await this.ensureInitialized()
if (!this.licensingSystem) {
console.log(colors.error('Licensing system not initialized'))
return
}
await this.licensingSystem.displayFeatureCatalog()
console.log(boxen(
`${emojis.brain}☁️ ${colors.brain('BRAIN CLOUD PREMIUM FEATURES')}\n\n` +
`Premium connectors and features have moved to Brain Cloud!\n\n` +
`${colors.accent('◆')} ${colors.dim('Setup Brain Cloud:')} ${colors.highlight('brainy cloud')}\n` +
`${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` +
`${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> {
await this.ensureInitialized()
if (!this.licensingSystem) {
console.log(colors.error('Licensing system not initialized'))
return
}
await this.licensingSystem.checkLicenseStatus(licenseId)
console.log(colors.info('License management has moved to Brain Cloud'))
console.log(colors.dim('Run: brainy cloud'))
}
async licenseTrial(featureId: string, customerName?: string, customerEmail?: string): Promise<void> {
await this.ensureInitialized()
if (!this.licensingSystem) {
console.log(colors.error('Licensing system not initialized'))
return
}
// Get customer info if not provided
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' }
))
}
console.log(boxen(
`${emojis.sparkle} ${colors.brain('START YOUR BRAIN CLOUD TRIAL')}\n\n` +
`${colors.accent('◆')} ${colors.dim('14-day free trial')}\n` +
`${colors.accent('◆')} ${colors.dim('No credit card required')}\n` +
`${colors.accent('◆')} ${colors.dim('Cancel anytime')}\n\n` +
`${colors.highlight('Run: brainy cloud')}\n\n` +
`Or visit: ${colors.accent('https://soulcraftlabs.com/brain-cloud')}`,
{ padding: 1, borderStyle: 'round', borderColor: '#FFD700' }
))
}
async licenseValidate(featureId: string): Promise<boolean> {
await this.ensureInitialized()
if (!this.licensingSystem) {
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
}
console.log(colors.info('Premium features available in Brain Cloud'))
console.log(colors.dim('Setup: brainy cloud'))
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> {
if (!this.licensingSystem) {
if (!silent) console.log(colors.error('Licensing system not initialized'))
return false
if (!silent) {
console.log(boxen(
`${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' }
))
}
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
return false
}
/**
@ -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
*/