Skip to main content
Glama
orneryd

M.I.M.I.R - Multi-agent Intelligent Memory & Insight Repository

by orneryd
mimir-chain1.56 kB
#!/usr/bin/env node /** * Global wrapper for mimir-chain command * Usage: mimir-chain "Your request here" * * Note: This file uses CommonJS (require) instead of ES modules * to ensure compatibility as a global bin script. */ import { spawn } from 'child_process'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Path to the GRAPH-RAG-TODO-main installation const INSTALL_DIR = path.resolve(__dirname, '..'); const CHAIN_SCRIPT = path.join(INSTALL_DIR, 'build', 'orchestrator', 'agent-chain.js'); const AGENTS_DIR = path.join(INSTALL_DIR, 'docs', 'agents'); // Get the user's request from command line args const userRequest = process.argv.slice(2).join(' '); if (!userRequest) { console.error('❌ Error: No request provided'); console.error('Usage: mimir-chain "Your request here"'); process.exit(1); } console.log(`🔗 Running Mimir Chain from: ${INSTALL_DIR}`); console.log(`📝 Request: ${userRequest}`); console.log(`📂 Output will be saved to: ${process.cwd()}/chain-output.md\n`); // Run the chain script with absolute paths const child = spawn('node', [CHAIN_SCRIPT, '--agents-dir', AGENTS_DIR, userRequest], { cwd: process.cwd(), // Run in user's current directory env: { ...process.env, MIMIR_INSTALL_DIR: INSTALL_DIR, // Pass install dir as env var MIMIR_AGENTS_DIR: AGENTS_DIR // Pass agents dir as env var }, stdio: 'inherit' }); child.on('exit', (code) => { process.exit(code); });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/orneryd/Mimir'

If you have feedback or need assistance with the MCP directory API, please join our Discord server