UNPKG

memorybank

Version:

A command-line tool for parsing and displaying memory bank status from markdown files, with support for Roo Code's Memory Bank

31 lines (28 loc) 1.06 kB
#!/usr/bin/env node import { fileURLToPath } from 'node:url'; import { dirname, join } from 'node:path'; const __dirname = dirname(fileURLToPath(import.meta.url)); const memoryBankPath = join(__dirname, '..', 'dist', 'memorybank-status.js'); import(memoryBankPath).then(async (module) => { try { const args = process.argv.slice(2); const showIncomplete = args.includes("--incomplete"); const docsPath = module.getDocsPathValue(args); if (docsPath) { const absolutePath = module.toTildePath(docsPath); await module.processDocsDirectory(absolutePath, showIncomplete); } else if (args.length > 0) { const filePath = module.toTildePath(args[0]); await module.processFile(filePath, showIncomplete); } else { console.error("Please provide a file path or --docs-path"); process.exit(1); } } catch (error) { console.error('Error:', error instanceof Error ? error.message : String(error)); process.exit(1); } }).catch(error => { console.error('Import error:', error); process.exit(1); });