UNPKG

@endlessblink/like-i-said-v2

Version:

Task Management & Memory for Claude - Track tasks, remember context, and maintain continuity across sessions with 27 powerful tools. Works with Claude Desktop and Claude Code.

67 lines (56 loc) โ€ข 2.65 kB
#!/usr/bin/env node import fs from 'fs'; import path from 'path'; import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); // Test the configuration that would be generated for Claude Code console.log('๐Ÿงช Testing NPX Configuration for Claude Code\n'); // Simulate the configuration const testConfig = { mcpServers: { 'like-i-said-memory-v2': { command: 'npx', args: ['-y', '-p', '@endlessblink/like-i-said-v2@latest', 'like-i-said-v2'], env: { MEMORY_DIR: path.join(process.cwd(), 'memories'), TASK_DIR: path.join(process.cwd(), 'tasks'), MCP_QUIET: 'true' } } } }; console.log('Configuration that Claude Code would use:'); console.log(JSON.stringify(testConfig, null, 2)); console.log('\nโœ… Key validations:'); console.log('1. Command is "npx" (not a local path) โœ“'); console.log('2. Uses -y flag for automatic installation โœ“'); console.log('3. Uses -p flag to specify package โœ“'); console.log('4. Specifies @latest version โœ“'); console.log('5. No local file dependencies โœ“'); console.log('\n๐Ÿ“‹ When Claude Code runs this configuration:'); console.log('1. NPX downloads @endlessblink/like-i-said-v2 to cache'); console.log('2. NPX runs: node cli.js (from cache)'); console.log('3. cli.js detects non-TTY mode and starts MCP server'); console.log('4. MCP server communicates via JSON-RPC protocol'); console.log('\nโœจ The complete command for users:'); console.log('claude mcp add like-i-said-memory-v2 -- npx -p @endlessblink/like-i-said-v2@latest like-i-said-v2'); // Verify the wrapper path fix const wrapperPath = path.join(__dirname, '..', 'scripts', 'mcp-wrappers', 'mcp-quiet-wrapper.js'); if (fs.existsSync(wrapperPath)) { const wrapperContent = fs.readFileSync(wrapperPath, 'utf8'); if (wrapperContent.includes("join(__dirname, '..', '..', 'server-markdown.js')")) { console.log('\nโœ… mcp-quiet-wrapper.js correctly points to server-markdown.js'); } else { console.log('\nโŒ mcp-quiet-wrapper.js has incorrect path to server-markdown.js'); } } // Check CLI default behavior const cliPath = path.join(__dirname, '..', 'cli.js'); const cliContent = fs.readFileSync(cliPath, 'utf8'); if (cliContent.includes('context.isNpxInstall || !process.stdout.isTTY')) { console.log('โœ… CLI correctly detects non-TTY mode for MCP execution'); } else { console.log('โŒ CLI may not correctly detect MCP execution mode'); } console.log('\n๐ŸŽฏ Summary: Configuration is correctly set up for Claude Code!');