@leohenon/opengh 0.0.0-beta.2 → 0.0.0-beta.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.
Files changed (3) hide show
  1. package/README.md +31 -14
  2. package/bin/opengh.cjs +11 -5
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -5,6 +5,11 @@
5
5
  </picture>
6
6
  </p>
7
7
 
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=orange" 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
+
8
13
  <p align="center">A familiar terminal interface for GitHub.</p>
9
14
 
10
15
  <picture>
@@ -15,33 +20,47 @@
15
20
  <img src="docs/assets/screenshot-light.png" alt="opengh showing a split diff and inline review for OpenTUI PR #209" />
16
21
  </picture>
17
22
 
18
- - **Manage** repositories, issues, pull requests, and Actions.
19
- - **Review** diffs, leave inline comments, and submit reviews.
20
- - **Navigate** with your keyboard or mouse.
23
+ - **Browse** repositories, commits, and Actions.
24
+ - **Manage** issues and pull requests.
25
+ - **Review** split or unified diffs, leave inline comments, and submit reviews.
26
+ - **Navigate** by keyboard or mouse, with customizable shortcuts and themes.
21
27
 
22
- ## Install
28
+ ## Install · [Guide](docs/installation.md)
23
29
 
24
- Available for macOS and Linux. Uses [GitHub CLI authentication](https://cli.github.com/manual/gh_auth).
30
+ Available for macOS and Linux.
25
31
 
26
32
  ```sh
33
+ # Curl
34
+ curl -fsSL \
35
+ https://github.com/leohenon/opengh/releases/download/v0.0.0-beta.4/install.sh \
36
+ | OPENGH_VERSION=0.0.0-beta.4 sh
37
+
27
38
  # Homebrew
28
39
  brew install leohenon/tap/opengh
29
40
 
30
41
  # npm
31
42
  npm install --global @leohenon/opengh
32
43
 
33
- # Curl
34
- curl -fsSL https://github.com/leohenon/opengh/releases/latest/download/install.sh | sh
35
-
36
44
  # Nix
37
45
  nix profile install github:leohenon/opengh#opengh nixpkgs#gh
38
46
  ```
39
47
 
40
- ## Open a repository
48
+ Requires [GitHub CLI](https://cli.github.com/) authentication.
49
+
50
+ ## Get started · [Usage](docs/usage.md)
41
51
 
42
52
  ```sh
43
- opengh . # Current directory's repository
44
- opengh owner/repo # Any repository
53
+ opengh . # Current directory's repository
54
+ opengh owner/repo # Any repository
55
+ opengh owner/repo --pr 123 # Open a specific pull request
56
+ ```
57
+
58
+ ## For agents · [Agent CLI](docs/agent-cli.md)
59
+
60
+ Descriptions, diffs, comments, and review threads in one command.
61
+
62
+ ```sh
63
+ npx skills add leohenon/opengh --skill opengh --global
45
64
  ```
46
65
 
47
66
  ## Update
@@ -52,9 +71,7 @@ opengh update
52
71
 
53
72
  ## Documentation
54
73
 
55
- [Configuration](https://github.com/leohenon/opengh/blob/main/docs/configuration.md) · [Keybindings](https://github.com/leohenon/opengh/blob/main/docs/keybindings.md) · [CLI](https://github.com/leohenon/opengh/blob/main/docs/cli.md) · [Development](https://github.com/leohenon/opengh/blob/main/docs/development.md)
56
-
57
- See the [roadmap](https://github.com/leohenon/opengh/blob/main/ROADMAP.md) for what's planned.
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)
58
75
 
59
76
  ---
60
77
 
package/bin/opengh.cjs CHANGED
@@ -8,16 +8,20 @@ const fs = require("node:fs")
8
8
 
9
9
  function usesMusl() {
10
10
  if (process.platform !== "linux") return false
11
- try { return !process.report.getReport().header.glibcVersionRuntime }
12
- catch { return fs.existsSync("/etc/alpine-release") }
11
+ try {
12
+ return !process.report.getReport().header.glibcVersionRuntime
13
+ } catch {
14
+ return fs.existsSync("/etc/alpine-release")
15
+ }
13
16
  }
14
17
 
15
18
  // Package managers that ignore "libc" install both Linux variants, so the choice is made here.
16
19
  const musl = usesMusl()
17
20
  const name = `opengh-${process.platform}-${process.arch}${musl ? "-musl" : ""}`
18
21
  let executable
19
- try { executable = require.resolve(`${name}/bin/opengh`) }
20
- catch {
22
+ try {
23
+ executable = require.resolve(`${name}/bin/opengh`)
24
+ } catch {
21
25
  console.error(`opengh: no executable is installed for ${process.platform} ${process.arch}${musl ? " (musl)" : ""}.
22
26
  Reinstall without omitting optional dependencies (they provide ${name}),
23
27
  or download a release from https://github.com/leohenon/opengh/releases.`)
@@ -25,7 +29,9 @@ or download a release from https://github.com/leohenon/opengh/releases.`)
25
29
  }
26
30
 
27
31
  // Some package managers drop the executable bit when unpacking.
28
- try { if (!(fs.statSync(executable).mode & 0o111)) fs.chmodSync(executable, 0o755) } catch {}
32
+ try {
33
+ if (!(fs.statSync(executable).mode & 0o111)) fs.chmodSync(executable, 0o755)
34
+ } catch {}
29
35
 
30
36
  const result = spawnSync(executable, process.argv.slice(2), { stdio: "inherit" })
31
37
  if (result.error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leohenon/opengh",
3
- "version": "0.0.0-beta.2",
3
+ "version": "0.0.0-beta.4",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/leohenon/opengh#readme",
6
6
  "bugs": "https://github.com/leohenon/opengh/issues",
@@ -35,11 +35,11 @@
35
35
  "node": ">=18"
36
36
  },
37
37
  "optionalDependencies": {
38
- "opengh-darwin-arm64": "0.0.0-beta.2",
39
- "opengh-darwin-x64": "0.0.0-beta.2",
40
- "opengh-linux-x64": "0.0.0-beta.2",
41
- "opengh-linux-arm64": "0.0.0-beta.2",
42
- "opengh-linux-x64-musl": "0.0.0-beta.2",
43
- "opengh-linux-arm64-musl": "0.0.0-beta.2"
38
+ "opengh-darwin-arm64": "0.0.0-beta.4",
39
+ "opengh-darwin-x64": "0.0.0-beta.4",
40
+ "opengh-linux-x64": "0.0.0-beta.4",
41
+ "opengh-linux-arm64": "0.0.0-beta.4",
42
+ "opengh-linux-x64-musl": "0.0.0-beta.4",
43
+ "opengh-linux-arm64-musl": "0.0.0-beta.4"
44
44
  }
45
45
  }