Add multi-graph support (Milestone 9)
- Graph manager: create, list, delete, use graphs - Automatic project detection via .cortex.json or git remote - Graph switching in db.ts connection manager - Cross-graph search with --all-graphs flag - CLI: graphs, use, init commands - MCP tools: memory_graphs, memory_use_graph, memory_create_graph, memory_delete_graph - Database migration from .memory to ~/.cortex/graphs
This commit is contained in:
@@ -22,7 +22,9 @@ import { ingestCommand, clipCommand } from './commands/ingest';
|
||||
import { exportCommand, vizCommand } from './commands/export';
|
||||
import { importCommand } from './commands/import';
|
||||
import { backupCommand, restoreDbCommand, listBackupsCommand } from './commands/backup-cmd';
|
||||
import { graphsCommand, useCommand, initCommand } from './commands/graphs';
|
||||
import { closeDb } from '../core/db';
|
||||
import { migrateOldDatabase } from '../core/db';
|
||||
|
||||
const program = new Command();
|
||||
|
||||
@@ -62,6 +64,12 @@ program.addCommand(importCommand);
|
||||
program.addCommand(backupCommand);
|
||||
program.addCommand(restoreDbCommand);
|
||||
program.addCommand(listBackupsCommand);
|
||||
program.addCommand(graphsCommand);
|
||||
program.addCommand(useCommand);
|
||||
program.addCommand(initCommand);
|
||||
|
||||
// Check for old database migration
|
||||
migrateOldDatabase();
|
||||
|
||||
program.hook('postAction', () => {
|
||||
closeDb();
|
||||
|
||||
Reference in New Issue
Block a user