@dean0x/showme
Advanced tools
+26
-0
@@ -10,2 +10,4 @@ #!/usr/bin/env node | ||
| import { ConsoleLogger } from "./utils/logger.js"; | ||
| import { startServer } from "./index.js"; | ||
| import { ResourceManager } from "./utils/resource-manager.js"; | ||
| import { readFileSync } from "fs"; | ||
@@ -84,2 +86,8 @@ import { fileURLToPath } from "url"; | ||
| } | ||
| else if (parsed.command === 'mcp') { | ||
| // For mcp command, treat the next arg as subcommand | ||
| if (!parsed.path) { | ||
| parsed.path = arg; | ||
| } | ||
| } | ||
| } | ||
@@ -96,2 +104,3 @@ } | ||
| showme diff [options] Open git diff in VS Code | ||
| showme mcp start Start MCP server | ||
@@ -192,2 +201,19 @@ File command: | ||
| break; | ||
| case 'mcp': { | ||
| // Check for 'start' subcommand | ||
| const subcommand = args.path || args.paths?.[0]; | ||
| if (subcommand === 'start') { | ||
| // Start the MCP server | ||
| const resourceManager = new ResourceManager(logger); | ||
| await startServer(resourceManager); | ||
| // Server will handle its own lifecycle, we don't exit here | ||
| return; | ||
| } | ||
| else { | ||
| console.error(`Error: Unknown mcp subcommand '${subcommand}'`); | ||
| console.error("Use 'showme mcp start' to start the MCP server"); | ||
| process.exit(1); | ||
| } | ||
| break; | ||
| } | ||
| default: | ||
@@ -194,0 +220,0 @@ console.error(`Error: Unknown command '${args.command}'`); |
+4
-2
@@ -250,3 +250,5 @@ #!/usr/bin/env node | ||
| } | ||
| // Run main when executed as a CLI | ||
| main(); | ||
| // Only run main if this is the entry point (not imported as module) | ||
| if (process.argv[1] === fileURLToPath(import.meta.url)) { | ||
| main(); | ||
| } |
+1
-1
| { | ||
| "name": "@dean0x/showme", | ||
| "version": "0.1.3", | ||
| "version": "0.1.4", | ||
| "description": "MCP server providing ShowFile and ShowDiff tools for VS Code integration with syntax highlighting", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+1
-1
@@ -53,3 +53,3 @@ # ShowMe MCP Server | ||
| "command": "npx", | ||
| "args": ["@dean0x/showme"] | ||
| "args": ["-y", "@dean0x/showme", "mcp", "start"] | ||
| } | ||
@@ -56,0 +56,0 @@ } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
124116
1.03%3167
0.89%