@leohenon/opengh 0.0.0-stage → 0.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 leohenon
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,86 @@
1
- # Temporary Holding Version
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/logo-dark-jetbrains.png" />
4
+ <img src="docs/assets/logo-light-jetbrains.png" alt="opengh" width="360" />
5
+ </picture>
6
+ </p>
2
7
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
8
+ <p align="center">
9
+ <a href="https://github.com/leohenon/opengh/releases"><img src="https://img.shields.io/github/v/release/leohenon/opengh?sort=semver&amp;style=flat-square&amp;labelColor=24292f&amp;color=0969da" alt="Latest release" /></a>&nbsp;
10
+ <a href="https://github.com/leohenon/opengh/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/leohenon/opengh/ci.yml?style=flat-square&amp;branch=main&amp;label=CI&amp;labelColor=24292f" alt="CI" /></a>
11
+ </p>
12
+
13
+ <p align="center">Run <code>opengh</code> in your repo, or pass it a GitHub link, and you're there. You'll already know your way around.</p>
14
+
15
+ <picture>
16
+ <source media="(prefers-reduced-motion: reduce) and (prefers-color-scheme: dark)" srcset="docs/assets/screenshot-dark.png" />
17
+ <source media="(prefers-reduced-motion: reduce)" srcset="docs/assets/screenshot-light.png" />
18
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshot-dark-animated.svg" type="image/svg+xml" />
19
+ <source media="(prefers-color-scheme: light)" srcset="docs/assets/screenshot-light-animated.svg" type="image/svg+xml" />
20
+ <img src="docs/assets/screenshot-light.png" alt="opengh showing a split diff and inline review for OpenTUI PR #209" />
21
+ </picture>
22
+
23
+ > **Public beta:** Commands and config may change before v1.0. Please [report bugs](https://github.com/leohenon/opengh/issues).
24
+
25
+ ## Install · [Guide](docs/installation.md)
26
+
27
+ Available for macOS and Linux. The only requirement is a signed-in [GitHub CLI](docs/installation.md#authenticate).
28
+
29
+ ```sh
30
+ # Curl
31
+ curl -fsSL https://github.com/leohenon/opengh/releases/latest/download/install.sh | sh
32
+
33
+ # Homebrew
34
+ brew install leohenon/tap/opengh
35
+
36
+ # npm
37
+ npm install --global @leohenon/opengh
38
+
39
+ # Nix
40
+ nix profile install github:leohenon/opengh#opengh nixpkgs#gh
41
+ ```
42
+
43
+ ## Get started · [Usage](docs/usage.md)
44
+
45
+ ```sh
46
+ opengh . # Current directory's repository
47
+ opengh owner/repo # Any repository
48
+ opengh owner/repo --pr 123 # Open a specific pull request
49
+ opengh https://github.com/owner/repo/pull/123 # A GitHub link
50
+ ```
51
+
52
+ Press `?` for shortcuts, or right-click anything.
53
+
54
+ ## Update
55
+
56
+ ```sh
57
+ opengh update
58
+ ```
59
+
60
+ ## For agents · [Agent CLI](docs/agent-cli.md)
61
+
62
+ Gives your agent a whole PR in one command, including the line comments `gh pr view` leaves out.
63
+
64
+ ```sh
65
+ npx skills add leohenon/opengh --skill opengh --global
66
+ ```
67
+
68
+ ## Demo · [Demos](docs/demos.md)
69
+
70
+ ![Browsing a pull request, opening a linked issue, and viewing a side-by-side commit diff in opengh](docs/assets/demos/readme.gif)
71
+
72
+ ## Documentation
73
+
74
+ [Installation](docs/installation.md) · [Usage](docs/usage.md) · [CLI](docs/cli.md) · [Keybindings](docs/keybindings.md) · [Configuration](docs/configuration.md) · [Agent CLI](docs/agent-cli.md) · [Development](docs/development.md) · [Roadmap](ROADMAP.md)
75
+
76
+ ---
77
+
78
+ <p align="center">
79
+ <sub>
80
+ <a href="https://github.com/leohenon/opengh/blob/main/LICENSE">MIT licensed</a> · Built with
81
+ <a href="https://bun.sh/">Bun</a>,
82
+ <a href="https://github.com/anomalyco/opentui">OpenTUI</a>,
83
+ <a href="https://www.solidjs.com/">SolidJS</a>, and
84
+ <a href="https://github.com/modem-dev/hunk">Hunk</a>.
85
+ </sub>
86
+ </p>
package/bin/opengh.cjs ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ "use strict"
3
+
4
+ // Published as the `opengh` command of the npm package. The executable itself comes from the
5
+ // optional dependency built for this platform; this file only finds and runs it.
6
+ const { spawnSync } = require("node:child_process")
7
+ const fs = require("node:fs")
8
+
9
+ function usesMusl() {
10
+ if (process.platform !== "linux") return false
11
+ try {
12
+ return !process.report.getReport().header.glibcVersionRuntime
13
+ } catch {
14
+ return fs.existsSync("/etc/alpine-release")
15
+ }
16
+ }
17
+
18
+ // Package managers that ignore "libc" install both Linux variants, so the choice is made here.
19
+ const musl = usesMusl()
20
+ const name = `opengh-${process.platform}-${process.arch}${musl ? "-musl" : ""}`
21
+ let executable
22
+ try {
23
+ executable = require.resolve(`${name}/bin/opengh`)
24
+ } catch {
25
+ console.error(`opengh: no executable is installed for ${process.platform} ${process.arch}${musl ? " (musl)" : ""}.
26
+ Reinstall without omitting optional dependencies (they provide ${name}),
27
+ or download a release from https://github.com/leohenon/opengh/releases.`)
28
+ process.exit(1)
29
+ }
30
+
31
+ // Some package managers drop the executable bit when unpacking.
32
+ try {
33
+ if (!(fs.statSync(executable).mode & 0o111)) fs.chmodSync(executable, 0o755)
34
+ } catch {}
35
+
36
+ const result = spawnSync(executable, process.argv.slice(2), { stdio: "inherit" })
37
+ if (result.error) {
38
+ console.error(`opengh: ${result.error.message}`)
39
+ process.exit(1)
40
+ }
41
+ // End the way the application did, so that shells and scripts see the same outcome.
42
+ if (result.signal) process.kill(process.pid, result.signal)
43
+ process.exit(result.status ?? 1)
package/package.json CHANGED
@@ -1,6 +1,45 @@
1
1
  {
2
2
  "name": "@leohenon/opengh",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.1",
4
+ "license": "MIT",
5
+ "homepage": "https://github.com/leohenon/opengh#readme",
6
+ "bugs": "https://github.com/leohenon/opengh/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/leohenon/opengh.git"
10
+ },
11
+ "description": "A familiar terminal interface for GitHub.",
12
+ "keywords": [
13
+ "github",
14
+ "terminal",
15
+ "tui",
16
+ "cli",
17
+ "pull-request",
18
+ "code-review"
19
+ ],
20
+ "bin": {
21
+ "opengh": "bin/opengh.cjs"
22
+ },
23
+ "files": [
24
+ "bin"
25
+ ],
26
+ "os": [
27
+ "darwin",
28
+ "linux"
29
+ ],
30
+ "cpu": [
31
+ "arm64",
32
+ "x64"
33
+ ],
34
+ "engines": {
35
+ "node": ">=18"
36
+ },
37
+ "optionalDependencies": {
38
+ "opengh-darwin-arm64": "0.0.1",
39
+ "opengh-darwin-x64": "0.0.1",
40
+ "opengh-linux-x64": "0.0.1",
41
+ "opengh-linux-arm64": "0.0.1",
42
+ "opengh-linux-x64-musl": "0.0.1",
43
+ "opengh-linux-arm64-musl": "0.0.1"
44
+ }
45
+ }