ghr-bin 0.1.0.dev1__py3-none-win_amd64.whl

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.
@@ -0,0 +1,65 @@
1
+ Metadata-Version: 2.4
2
+ Name: ghr-bin
3
+ Version: 0.1.0.dev1
4
+ Summary: Install tools from GitHub releases
5
+ Home-page: https://github.com/cataggar/ghr
6
+ License: MIT
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+
10
+ # ghr
11
+
12
+ Install tools from GitHub releases.
13
+
14
+ ## Usage
15
+
16
+ ```
17
+ ghr install <owner/repo[@tag]> Install a tool from a GitHub release
18
+ ghr uninstall <name> Remove an installed tool
19
+ ghr list List installed tools
20
+ ghr upgrade [name] Upgrade installed tools
21
+ ghr run <owner/repo[@tag]> Run a tool without installing
22
+ ghr dir [--bin] [--cache] Show ghr directories
23
+ ```
24
+
25
+ ### Examples
26
+
27
+ ```sh
28
+ # Install latest release
29
+ ghr install ctaggart/zig
30
+
31
+ # Install a specific tag (URL-encoded '+' handled transparently)
32
+ ghr install ctaggart/zig@v0.16.0-dev.3153+d6f43caad
33
+
34
+ # Show where tools are stored
35
+ ghr dir
36
+
37
+ # Show where binaries are symlinked
38
+ ghr dir --bin
39
+ ```
40
+
41
+ ## Directories
42
+
43
+ Follows [uv tool](https://docs.astral.sh/uv/) conventions.
44
+
45
+ | Purpose | Unix | Windows |
46
+ |---------|------|---------|
47
+ | Binaries | `~/.local/bin/` | `%USERPROFILE%\.local\bin\` |
48
+ | Tool storage | `~/.local/share/ghr/tools/` | `%APPDATA%\ghr\data\tools\` |
49
+ | Cache | `~/.cache/ghr/` | `%LOCALAPPDATA%\ghr\cache\` |
50
+
51
+ Override with `GHR_BIN_DIR`, `GHR_TOOL_DIR`, `GHR_CACHE_DIR`.
52
+
53
+ ## Build
54
+
55
+ Requires [Zig](https://ziglang.org/) 0.15+.
56
+
57
+ ```sh
58
+ zig build
59
+ zig build run -- --help
60
+ zig build test
61
+ ```
62
+
63
+ ## License
64
+
65
+ MIT
@@ -0,0 +1,6 @@
1
+ ghr_cli/__init__.py,sha256=iAghpoYAexSpRyhpP4tgQBklLHeGe4FW3e9dqDJ5U-U,855
2
+ ghr_cli/ghr.exe,sha256=jThM87r_xxEawM93_diNqAGNNee8T2yQuYA91Y4dUbA,320000
3
+ ghr_bin-0.1.0.dev1.dist-info/METADATA,sha256=rJp8mwn4Tuze7mS8fxWCVDVHH32PsLwFXwTUBp4csPg,1447
4
+ ghr_bin-0.1.0.dev1.dist-info/WHEEL,sha256=Ica8fhmbe52XbO1cyRYPNSx0KW5onuxFfHy_a18hkCU,93
5
+ ghr_bin-0.1.0.dev1.dist-info/entry_points.txt,sha256=xUZ_Y6cUlmTNCvfbf3opHaMlQT1477lUmCBARfkJD3o,37
6
+ ghr_bin-0.1.0.dev1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: build_wheels.py
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_amd64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ ghr = ghr_cli:main
ghr_cli/__init__.py ADDED
@@ -0,0 +1,36 @@
1
+ """ghr-bin — Install tools from GitHub releases."""
2
+
3
+ import os
4
+ import subprocess
5
+ import sys
6
+ from pathlib import Path
7
+
8
+
9
+ def _get_version() -> str:
10
+ try:
11
+ from importlib.metadata import version
12
+
13
+ return version("ghr-bin")
14
+ except Exception:
15
+ return "0.0.0"
16
+
17
+
18
+ _EXT = ".exe" if sys.platform == "win32" else ""
19
+
20
+
21
+ def _binary_path() -> Path:
22
+ """Return the path to the ghr binary."""
23
+ return Path(__file__).parent / f"ghr{_EXT}"
24
+
25
+
26
+ def main() -> None:
27
+ """Run the ghr binary, replacing the current process on Unix."""
28
+ binary = _binary_path()
29
+ if not binary.exists():
30
+ print(f"ghr binary not found at {binary}", file=sys.stderr)
31
+ sys.exit(1)
32
+ args = [str(binary), *sys.argv[1:]]
33
+ if sys.platform != "win32":
34
+ os.execv(args[0], args)
35
+ else:
36
+ raise SystemExit(subprocess.call(args))
ghr_cli/ghr.exe ADDED
Binary file