diff --git a/bin/brainy-minimal.js b/bin/brainy-minimal.js new file mode 100755 index 00000000..35b03570 --- /dev/null +++ b/bin/brainy-minimal.js @@ -0,0 +1,82 @@ +#!/usr/bin/env node + +/** + * Brainy CLI - Minimal Version (Conversation Commands Only) + * + * This is a temporary minimal CLI that only includes working conversation commands + * Full CLI will be restored in version 3.20.0 + */ + +import { Command } from 'commander' +import { readFileSync } from 'fs' +import { dirname, join } from 'path' +import { fileURLToPath } from 'url' + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const packageJson = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf8')) + +const program = new Command() + +program + .name('brainy') + .description('🧠 Brainy - Infinite Agent Memory') + .version(packageJson.version) + +// Dynamically load conversation command +const conversationCommand = await import('../dist/cli/commands/conversation.js').then(m => m.default) + +program + .command('conversation') + .alias('conv') + .description('💬 Infinite agent memory and context management') + .addCommand( + new Command('setup') + .description('Set up MCP server for Claude Code integration') + .action(async () => { + await conversationCommand.handler({ action: 'setup', _: [] }) + }) + ) + .addCommand( + new Command('remove') + .description('Remove MCP server and clean up') + .action(async () => { + await conversationCommand.handler({ action: 'remove', _: [] }) + }) + ) + .addCommand( + new Command('search') + .description('Search messages across conversations') + .requiredOption('-q, --query ', 'Search query') + .option('-c, --conversation-id ', 'Filter by conversation') + .option('-r, --role ', 'Filter by role') + .option('-l, --limit ', 'Maximum results', '10') + .action(async (options) => { + await conversationCommand.handler({ action: 'search', ...options, _: [] }) + }) + ) + .addCommand( + new Command('context') + .description('Get relevant context for a query') + .requiredOption('-q, --query ', 'Context query') + .option('-l, --limit ', 'Maximum messages', '10') + .action(async (options) => { + await conversationCommand.handler({ action: 'context', ...options, _: [] }) + }) + ) + .addCommand( + new Command('thread') + .description('Get full conversation thread') + .requiredOption('-c, --conversation-id ', 'Conversation ID') + .action(async (options) => { + await conversationCommand.handler({ action: 'thread', ...options, _: [] }) + }) + ) + .addCommand( + new Command('stats') + .description('Show conversation statistics') + .action(async () => { + await conversationCommand.handler({ action: 'stats', _: [] }) + }) + ) + +program.parse(process.argv) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 1421d814..2f5141d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1840,9 +1840,9 @@ } }, "node_modules/@huggingface/transformers": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.2.tgz", - "integrity": "sha512-6SOxo6XziupnQ5Vs5vbbs74CNB6ViHLHGQJjY6zj88JeiDtJ2d/ADKxaay688Sf2KcjtdF3dyBL11C5pJS2NxQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@huggingface/transformers/-/transformers-3.7.4.tgz", + "integrity": "sha512-nMnLM26EX6SlGoIvljsLCbAWwltGJZEaTe/7ZtuVQP4S9Zo0swJ5zZAdZw9c8xGeEZ5Rfs23FSflsV64o4X2MQ==", "license": "Apache-2.0", "dependencies": { "@huggingface/jinja": "^0.5.1", diff --git a/package.json b/package.json index 68838d0d..3d808a1c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "types": "dist/index.d.ts", "type": "module", "bin": { - "brainy": "bin/brainy.js" + "brainy": "bin/brainy-minimal.js" }, "sideEffects": [ "./dist/setup.js", @@ -128,6 +128,9 @@ "README.md", "CHANGELOG.md" ], + "overrides": { + "boolean": "3.2.0" + }, "devDependencies": { "@rollup/plugin-commonjs": "^28.0.6", "@rollup/plugin-node-resolve": "^16.0.1", diff --git a/src/cli/index.ts b/src/cli/index.ts index 662f04dc..7e946504 100644 --- a/src/cli/index.ts +++ b/src/cli/index.ts @@ -10,9 +10,6 @@ import { Command } from 'commander' import chalk from 'chalk' import ora from 'ora' import { Brainy } from '../brainy.js' -import { neuralCommands } from './commands/neural.js' -import { coreCommands } from './commands/core.js' -import { utilityCommands } from './commands/utility.js' import conversationCommand from './commands/conversation.js' import { readFileSync } from 'fs' import { fileURLToPath } from 'url'