brainy/cortex-persistent.js
David Snelling 0fef72aa24 feat: add Cortex CLI, augmentation system, and enterprise features
Major enhancements to Brainy vector + graph database:

Core Features (FREE):
- Cortex CLI: Complete command center for database management
- Neural Import: AI-powered data understanding and entity extraction
- Augmentation Pipeline: 8-stage extensible processing system
- Brainy Chat: Natural language interface to query data
- Performance monitoring and health diagnostics
- Backup/restore with compression and encryption
- Webhook system for enterprise integrations

Infrastructure:
- Clean separation of core (open source) and premium features
- Lazy-loaded augmentations with zero performance impact
- Comprehensive documentation for all new features
- Full TypeScript support with proper interfaces

Performance:
- Zero impact on core operations (proven with benchmarks)
- 2-3% performance improvement from better caching
- Package size remains at 643KB (no bloat)

Security:
- Removed sensitive files from Git history
- Added .gitignore rules for PDFs and private files
- Premium features in separate private repository

Premium Features (separate repository):
- Quantum Vault connectors (Notion, Salesforce, Slack, Asana)
- Licensing system for premium augmentations
- Revenue projections and business model

This commit maintains 100% backward compatibility while adding
powerful enterprise features as progressive enhancements.
2025-08-07 19:33:03 -07:00

64 lines
No EOL
1.8 KiB
JavaScript

#!/usr/bin/env node
// Persistent Cortex setup using filesystem
import { Cortex } from './dist/cortex/cortex.js'
async function setup() {
console.log('🧠 Setting up persistent Cortex with filesystem storage...\n')
const cortex = new Cortex()
// Initialize with filesystem (persistent)
await cortex.init({
storage: 'filesystem',
encryption: false,
chat: true
})
// Add sample data
console.log('Adding sample data...\n')
await cortex.add('John Smith is a Senior Software Engineer at TechCorp who specializes in Python and JavaScript', {
type: 'person',
name: 'John Smith',
role: 'Senior Software Engineer',
company: 'TechCorp',
skills: ['Python', 'JavaScript', 'React'],
experience: 8
})
await cortex.add('Jane Doe is a Data Scientist at DataCo expert in Python and Machine Learning', {
type: 'person',
name: 'Jane Doe',
role: 'Data Scientist',
company: 'DataCo',
skills: ['Python', 'TensorFlow', 'Machine Learning'],
experience: 6
})
await cortex.add('Alice Chen is a Product Manager at StartupXYZ', {
type: 'person',
name: 'Alice Chen',
role: 'Product Manager',
company: 'StartupXYZ',
skills: ['Product Strategy', 'Analytics'],
experience: 5
})
await cortex.add('AI Customer Analytics Platform using machine learning', {
type: 'project',
name: 'Customer Analytics',
status: 'active',
tech: ['Python', 'TensorFlow']
})
console.log('\n✅ Setup complete! Data is now persistent.\n')
console.log('Try these commands:\n')
console.log(' node bin/cortex.js chat "Who knows Python?"')
console.log(' node bin/cortex.js search "Python"')
console.log(' node bin/cortex.js stats')
console.log(' node bin/cortex.js fields')
console.log(' node bin/cortex.js chat # Interactive mode')
}
setup().catch(console.error)