docorbit 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ import { runImpactCommand } from "./commands/impact.js";
15
15
  import { runDashboardCommand } from "./commands/dashboard.js";
16
16
  import { runExportCommand } from "./commands/export.js";
17
17
  import { handleEvaluateCommand } from "./commands/evaluate.js";
18
- const VERSION = '0.1.1';
18
+ const VERSION = '0.1.4';
19
19
  function printHelp() {
20
20
  console.log(`
21
21
  DocOrbit — The Documentation Intelligence Layer for Coding Agents
@@ -74,7 +74,7 @@ EXAMPLES:
74
74
  docorbit verify "fetch('/v1/charges', { method: 'POST' })" --doc-version v14
75
75
  docorbit diff --from v14 --to v15
76
76
  docorbit impact --from v14 --to v15 --project .
77
- docorbit mcp --stdio
77
+ docorbit mcp
78
78
  docorbit api "create subscription" --doc-version v1
79
79
  docorbit examples "verify webhook signature" --language typescript --framework express
80
80
  docorbit pitfalls "server actions" --kind server_only --doc-version v14
@@ -82,7 +82,7 @@ EXAMPLES:
82
82
  `);
83
83
  }
84
84
  export async function main(args = process.argv.slice(2)) {
85
- if (args.length === 0 || args.includes('-h') || args.includes('--help')) {
85
+ if (args.includes('-h') || args.includes('--help')) {
86
86
  printHelp();
87
87
  return;
88
88
  }
@@ -90,6 +90,17 @@ export async function main(args = process.argv.slice(2)) {
90
90
  console.log(`DocOrbit v${VERSION}`);
91
91
  return;
92
92
  }
93
+ // When invoked with zero arguments:
94
+ // 1. If spawned by an MCP host/pipe (!process.stdin.isTTY), automatically start MCP server
95
+ // 2. If run in an interactive terminal, display the CLI help menu
96
+ if (args.length === 0) {
97
+ if (!process.stdin.isTTY) {
98
+ await runMcpCommand({ stdio: true });
99
+ return;
100
+ }
101
+ printHelp();
102
+ return;
103
+ }
93
104
  const command = args[0];
94
105
  const queryArg = args[1]?.startsWith('-') ? undefined : args[1];
95
106
  const isJson = args.includes('--json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docorbit",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "The Documentation Intelligence Layer for AI Coding Agents",
5
5
  "type": "module",
6
6
  "main": "./dist/packages/core/src/index.js",
@@ -43,8 +43,5 @@
43
43
  "context"
44
44
  ],
45
45
  "author": "DocOrbit Team",
46
- "license": "MIT",
47
- "dependencies": {
48
- "docorbit": "^0.1.1"
49
- }
46
+ "license": "MIT"
50
47
  }