@dst-justin/relay 2.0.0 → 2.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/README.md +18 -6
- package/package.json +1 -1
- package/relay +4 -3
package/README.md
CHANGED
|
@@ -20,25 +20,37 @@ A lightweight CLI tool for switching between multiple Claude Code accounts insta
|
|
|
20
20
|
|
|
21
21
|
## Installation
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### npx (no install required)
|
|
24
|
+
|
|
25
|
+
Run once without installing anything permanently:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx @dst-justin/relay install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This copies the `relay` script to `/usr/local/bin/relay` (or `~/bin/relay` as fallback). After that, use `relay` directly.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### npm (global install — recommended)
|
|
24
36
|
|
|
25
37
|
Requires Node.js 16+. Installs the `relay` command globally:
|
|
26
38
|
|
|
27
39
|
```bash
|
|
28
|
-
npm install -g
|
|
40
|
+
npm install -g @dst-justin/relay
|
|
29
41
|
```
|
|
30
42
|
|
|
31
43
|
To update later:
|
|
32
44
|
|
|
33
45
|
```bash
|
|
34
|
-
npm update -g
|
|
46
|
+
npm update -g @dst-justin/relay
|
|
35
47
|
# or from inside relay:
|
|
36
48
|
relay update
|
|
37
49
|
```
|
|
38
50
|
|
|
39
51
|
---
|
|
40
52
|
|
|
41
|
-
### macOS / Linux / WSL (manual)
|
|
53
|
+
### macOS / Linux / WSL (manual, no Node.js)
|
|
42
54
|
|
|
43
55
|
```bash
|
|
44
56
|
git clone https://github.com/darkstar1227/relay.git
|
|
@@ -47,11 +59,11 @@ cd relay
|
|
|
47
59
|
# Make the script executable
|
|
48
60
|
chmod +x relay
|
|
49
61
|
|
|
50
|
-
# Install (
|
|
62
|
+
# Install (copies script to /usr/local/bin)
|
|
51
63
|
./relay install
|
|
52
64
|
```
|
|
53
65
|
|
|
54
|
-
This
|
|
66
|
+
This copies the script to `/usr/local/bin/relay` (falls back to `~/bin/relay` if permissions are restricted).
|
|
55
67
|
|
|
56
68
|
#### Verify permissions
|
|
57
69
|
|
package/package.json
CHANGED
package/relay
CHANGED
|
@@ -604,15 +604,16 @@ cmd_install() {
|
|
|
604
604
|
|
|
605
605
|
hdr "Install relay"
|
|
606
606
|
|
|
607
|
-
if
|
|
607
|
+
if rm -f "${target}" 2>/dev/null && cp "${script_path}" "${target}" 2>/dev/null && chmod 755 "${target}" 2>/dev/null; then
|
|
608
608
|
ok "Installed at ${target}"
|
|
609
609
|
log "Run ${CY}relay help${R} to verify"
|
|
610
|
-
elif sudo
|
|
610
|
+
elif sudo rm -f "${target}" 2>/dev/null && sudo cp "${script_path}" "${target}" 2>/dev/null && sudo chmod 755 "${target}" 2>/dev/null; then
|
|
611
611
|
ok "Installed at ${target} (via sudo)"
|
|
612
612
|
else
|
|
613
613
|
warn "Cannot write to /usr/local/bin — installing to ~/bin instead"
|
|
614
614
|
mkdir -p "${HOME}/bin"
|
|
615
|
-
|
|
615
|
+
rm -f "${HOME}/bin/relay" 2>/dev/null
|
|
616
|
+
cp "${script_path}" "${HOME}/bin/relay" && chmod 755 "${HOME}/bin/relay"
|
|
616
617
|
ok "Installed at ${HOME}/bin/relay"
|
|
617
618
|
echo ""
|
|
618
619
|
warn "Make sure ~/bin is in your PATH (.zshrc / .bashrc):"
|