oh-my-pr 2.7.0 → 2.8.0

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.
package/README.md CHANGED
@@ -62,7 +62,7 @@ npm install -g oh-my-pr
62
62
  oh-my-pr
63
63
  ```
64
64
 
65
- That's it. The dashboard opens in your browser at `http://localhost:5001`.
65
+ That's it. The terminal UI launches in your shell. Run `oh-my-pr web` to start the web dashboard instead.
66
66
 
67
67
  ### Prerequisites
68
68
 
@@ -75,12 +75,14 @@ That's it. The dashboard opens in your browser at `http://localhost:5001`.
75
75
  ### CLI Usage
76
76
 
77
77
  ```bash
78
- oh-my-pr Start the dashboard server (opens browser)
78
+ oh-my-pr Launch the terminal UI (default)
79
+ oh-my-pr web Start the web dashboard server (opens browser)
80
+ oh-my-pr mcp Start the MCP server for Claude Desktop / OpenClaw
79
81
  oh-my-pr --help Show help message
80
82
  oh-my-pr --version Print the version
81
83
  ```
82
84
 
83
- Set `PORT` to change the default port (`5001`).
85
+ Set `PORT` to change the default web server port (`5001`).
84
86
 
85
87
  ### Run From Source
86
88
 
@@ -95,10 +97,10 @@ The dashboard is served on port `5001` by default. All `/api/*` routes are restr
95
97
 
96
98
  ## MCP and API
97
99
 
98
- Code Factory exposes the same local system through REST and MCP.
100
+ Oh-my-pr exposes the same local system through REST and MCP.
99
101
 
100
102
  ```bash
101
- npm run mcp
103
+ oh-my-pr mcp
102
104
  ```
103
105
 
104
106
  Use it with MCP hosts such as Claude Desktop or OpenClaw, or call the REST API directly from local tooling. Full endpoint and tool docs live in [LOCAL_API.md](LOCAL_API.md).
@@ -2,34 +2,30 @@
2
2
  "use strict";
3
3
 
4
4
  const pkg = require("../package.json");
5
- const arg = process.argv[2];
5
+ const { formatCliHelp, parseCliArgs } = require("../dist/cli.cjs");
6
+ const parsed = parseCliArgs(process.argv.slice(2));
6
7
 
7
- if (arg === "--version" || arg === "-v") {
8
+ if (parsed.mode === "version") {
8
9
  console.log(pkg.version);
9
10
  process.exit(0);
10
11
  }
11
12
 
12
- if (arg === "--help" || arg === "-h") {
13
- console.log(`
14
- oh-my-pr v${pkg.version}
15
-
16
- Autonomous GitHub PR babysitter — watches repos, triages review
17
- feedback, and dispatches AI agents to fix code locally.
18
-
19
- Usage:
20
- oh-my-pr Start the dashboard server
21
- oh-my-pr --help Show this help message
22
- oh-my-pr --version Print the version
23
-
24
- Environment variables:
25
- PORT Server port (default: 5001)
26
- GITHUB_TOKEN GitHub personal access token
27
- OH_MY_PR_HOME Override config/state directory (~/.oh-my-pr)
28
-
29
- https://github.com/yungookim/oh-my-pr
30
- `);
13
+ if (parsed.mode === "help") {
14
+ if (parsed.error) {
15
+ console.error(parsed.error);
16
+ }
17
+ console.log(formatCliHelp(pkg.version));
31
18
  process.exit(0);
32
19
  }
33
20
 
34
21
  process.env.NODE_ENV = process.env.NODE_ENV || "production";
35
- require("../dist/index.cjs");
22
+ if (parsed.mode === "web") {
23
+ require("../dist/index.cjs");
24
+ } else if (parsed.mode === "mcp") {
25
+ require("../dist/mcp.cjs");
26
+ } else {
27
+ import("../dist/tui.mjs").catch((error) => {
28
+ console.error(error instanceof Error ? error.message : String(error));
29
+ process.exit(1);
30
+ });
31
+ }
package/dist/cli.cjs ADDED
@@ -0,0 +1,20 @@
1
+ "use strict";var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var a=(r,e)=>{for(var o in e)i(r,o,{get:e[o],enumerable:!0})},h=(r,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of p(e))!m.call(r,t)&&t!==o&&i(r,t,{get:()=>e[t],enumerable:!(n=s(e,t))||n.enumerable});return r};var d=r=>h(i({},"__esModule",{value:!0}),r);var u={};a(u,{formatCliHelp:()=>c,parseCliArgs:()=>l});module.exports=d(u);function l(r){let e=r[0];return e?e==="web"?{mode:"web"}:e==="mcp"?{mode:"mcp"}:e==="--help"||e==="-h"?{mode:"help"}:e==="--version"||e==="-v"?{mode:"version"}:{mode:"help",error:`Unknown command: ${e}`}:{mode:"tui"}}function c(r){return`
2
+ oh-my-pr v${r}
3
+
4
+ Autonomous GitHub PR babysitter \u2014 watches repos, triages review
5
+ feedback, and dispatches AI agents to fix code locally.
6
+
7
+ Usage:
8
+ oh-my-pr Start the terminal UI
9
+ oh-my-pr web Start the dashboard server
10
+ oh-my-pr mcp Start the MCP server
11
+ oh-my-pr --help Show this help message
12
+ oh-my-pr --version Print the version
13
+
14
+ Environment variables:
15
+ PORT Server port (default: 5001)
16
+ GITHUB_TOKEN GitHub personal access token
17
+ OH_MY_PR_HOME Override config/state directory (~/.oh-my-pr)
18
+
19
+ https://github.com/yungookim/oh-my-pr
20
+ `}0&&(module.exports={formatCliHelp,parseCliArgs});