feat: Complete 9 unified methods with CLI parity and triple-power search

- Add missing add-noun and add-verb CLI commands for full API parity
- Update CLI documentation to showcase triple-power search capabilities
- Add comprehensive type-safe augmentation management system
- Verify search supports vector + metadata + graph traversal in one call
- All 9 unified methods now available via both API and CLI
- Complete documentation accuracy fixes and cleanup
This commit is contained in:
David Snelling 2025-08-15 11:20:13 -07:00
parent 4fdaa7e22c
commit b01e3340f1
9 changed files with 461 additions and 83 deletions

View file

@ -20,7 +20,7 @@ brainy neural-import data.csv
brainy add "data" # Smart by default
brainy search "query" # Unified search
brainy import data.csv # Neural import built-in
# Just 9 core commands total
# Just 9 unified methods total
```
## ⚡ Quick Start
@ -40,7 +40,7 @@ brainy init
# ✓ Performance tier (small, medium, large, enterprise)
```
## 🧠 The Core Commands
## 🧠 The 9 Unified Methods
### 1. `brainy add` - Smart Data Addition
```bash
@ -57,19 +57,22 @@ brainy add "Sensitive data" --encrypt
brainy add "Raw text data" --literal
```
### 2. `brainy search` - Unified Search
### 2. `brainy search` - Triple-Power Unified Search
```bash
# Semantic search
# 🎯 Vector/Semantic search
brainy search "tech companies and their leaders"
# With filters
brainy search "customer feedback" --filter '{"rating": {"$gte": 4}}'
# 🔍 Metadata/Facet search with MongoDB operators
brainy search "" --filter '{"rating": {"$gte": 4}, "department": "Engineering"}'
# Limit results
brainy search "AI projects" --limit 5
# 🕸️ Graph traversal with relationships
brainy search "project teams" --include-relationships
# Include metadata in output
brainy search "projects" --include-metadata
# ⚡ TRIPLE POWER: All three combined!
brainy search "engineering leaders" --filter '{"level": {"$gte": 7}}' --include-relationships
# Limit results and include metadata
brainy search "AI projects" --limit 5 --include-metadata
```
### 3. `brainy import` - Bulk Data Import
@ -123,6 +126,43 @@ brainy export --format csv --filter '{"type": "person"}' --output people.csv
brainy export --include-relationships --output full-backup.json
```
### 7. `brainy add-noun` - Create Typed Entities
```bash
# Add people with metadata
brainy add-noun "Sarah Johnson" --type Person --metadata '{"role": "CTO", "level": 9}'
# Add organizations
brainy add-noun "SoulCraft Labs" --type Organization --metadata '{"industry": "AI"}'
# Add projects with rich metadata
brainy add-noun "AI Platform" --type Project --metadata '{"status": "active", "budget": 500000}'
```
### 8. `brainy add-verb` - Create Relationships
```bash
# Connect entities with relationships
brainy add-verb person_123 org_456 --type WorksFor --metadata '{"since": "2023-01-01"}'
# Project relationships
brainy add-verb person_123 project_789 --type LeadsProject
# Any relationship type
brainy add-verb entity_1 entity_2 --type CustomRelation --metadata '{"strength": 0.9}'
```
### 9. `brainy augment` - Extend Your Brain
```bash
# List all augmentations
brainy augment list
# Enable/disable augmentations
brainy augment enable sentiment-analyzer
brainy augment disable sentiment-analyzer
# Install community augmentations (future)
brainy augment install brainy-sentiment
```
## 🎮 Interactive Commands
### `brainy chat` - Talk to Your Data

View file

@ -4,10 +4,10 @@ Get up and running with Brainy 1.0's unified API in just a few minutes!
## 🎉 What's New in 1.0?
Brainy 1.0 introduces the **unified API** - ONE way to do everything with just **8 core methods**:
Brainy 1.0 introduces the **unified API** - ONE way to do everything with just **9 core methods**:
```javascript
// 🎯 THE 8 UNIFIED METHODS:
// 🎯 THE 9 UNIFIED METHODS:
await brain.add("Smart data addition") // 1. Smart addition
await brain.addNoun("John Doe", NounType.Person) // 2. Typed entities
await brain.addVerb(id1, id2, VerbType.CreatedBy) // 3. Relationships
@ -16,6 +16,7 @@ await brain.import(["data1", "data2"]) // 5. Bulk import
await brain.update(id1, "Updated data") // 6. Smart updates
await brain.delete(verb) // 7. Soft delete
await brain.export({ format: 'json' }) // 8. Export data
brain.augment(myAugmentation) // 9. Extend infinitely!
```
## ⚡ The 2-Minute Setup