Initial commit: RA-H Open Source Edition

Local-first knowledge management system with BYO API keys.

Features:
- 3-panel UI (Nodes | Focus | Helpers)
- SQLite + sqlite-vec for vector search
- Agent system (Easy/Hard mode orchestrators)
- Content extraction (YouTube, PDF, web)
- Integrate workflow for connection discovery
- Dimension system with auto-assignment

Tech stack:
- Next.js 15 + TypeScript + Tailwind CSS
- Anthropic (Claude) + OpenAI (GPT) via Vercel AI SDK

Setup:
  npm install && npm rebuild better-sqlite3
  scripts/dev/bootstrap-local.sh
  npm run dev

MIT License
This commit is contained in:
“BeeRad”
2025-12-15 16:14:28 +11:00
commit 733d1c3407
226 changed files with 46231 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
# RA-H Scripts
Utility scripts for managing the RA-H knowledge management system.
## Directory Structure
```
scripts/
├── database/ # Database management
│ ├── backup.sh # Create database backups
│ └── restore.sh # Restore from backups
├── helpers/ # Helper management (CRITICAL - used by API)
│ ├── duplicate-helper.js # Create new helpers
│ └── delete-helper.js # Remove helpers
└── migrations/ # Completed one-time migrations
└── cleanup-dimensions.sql
```
## Database Scripts
### Create a Backup
```bash
npm run backup
```
- Creates timestamped backup in `/backups/` folder
- Example: `rah_backup_20250902_102846.sql`
- Includes all nodes, chunks, edges, dimensions
### Restore from Backup
```bash
npm run restore backups/rah_backup_20250902_102846.sql
```
- ⚠️ **WARNING**: Replaces entire database
- Requires confirmation before proceeding
- Shows verification after restore
### List Backups
```bash
ls -lt backups/
```
## Helper Scripts
⚠️ **CRITICAL**: These scripts are used by the API at runtime. DO NOT modify or delete.
### Create New Helper
Called automatically by the API when creating helpers through the UI.
```bash
node scripts/helpers/duplicate-helper.js "HelperName"
```
### Delete Helper
Called automatically by the API when deleting helpers through the UI.
```bash
node scripts/helpers/delete-helper.js "helper-id"
```
## What Gets Backed Up
- All nodes (42,000+ knowledge items)
- Content chunks and embeddings
- Node connections/edges
- Dimensions and metadata
- Database schema and indexes
## Notes
- Backups typically ~250MB for 40k+ nodes
- Store backups safely - they contain your entire knowledge base
- Helper scripts are integrated with the application - modify with caution