Skip to content

Commit f8d88a9

Browse files
committed
debug: cli
1 parent e608d1a commit f8d88a9

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

.vibe/development-plan-publish-cli.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ if (args.length === 0) {
156156
- [x] Fix CLI routing issue - entry point was not properly awaiting imports
157157
- [x] Fix missing CLI dependencies in main package (commander, chalk, ora)
158158
- [x] Fix MCP server import - call startServer() function instead of importing index.js
159+
- [x] Debug npx execution - added debug output to see what arguments npx passes
160+
- [x] **FOUND ROOT CAUSE**: Local packaging script doesn't include packages/ directory in tarball
159161

160162
### Completed
161163

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "agentic-knowledge-mcp",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "A Model Context Protocol server for agentic knowledge guidance with web-based documentation loading and intelligent search instructions",
55
"type": "module",
66
"main": "packages/mcp-server/dist/index.js",

packages/cli/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ const __dirname = dirname(__filename);
1616
async function main() {
1717
const args = process.argv.slice(2);
1818

19+
// Debug output to stderr so it doesn't interfere with CLI output
20+
console.error(`[DEBUG] process.argv: ${JSON.stringify(process.argv)}`);
21+
console.error(`[DEBUG] args: ${JSON.stringify(args)}`);
22+
console.error(`[DEBUG] args.length: ${args.length}`);
23+
1924
if (args.length === 0) {
25+
console.error("[DEBUG] No args - starting MCP server");
2026
// No arguments, start MCP server
2127
const isLocal = existsSync(
2228
join(__dirname, "../../mcp-server/dist/index.js"),
@@ -31,6 +37,7 @@ async function main() {
3137
await startServer();
3238
}
3339
} else {
40+
console.error("[DEBUG] Has args - starting CLI");
3441
// Any arguments, run CLI
3542
const { runCli } = await import("./cli.js");
3643
runCli();

0 commit comments

Comments
 (0)