@dst-justin/relay 2.2.4 → 2.2.6
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 +6 -0
- package/package.json +1 -1
- package/relay +55 -1
package/README.md
CHANGED
|
@@ -223,6 +223,12 @@ Sessions live in `~/.claude/projects/` and are shared across all accounts — af
|
|
|
223
223
|
|
|
224
224
|
## Changelog
|
|
225
225
|
|
|
226
|
+
### v2.2.6 — 2026-07-04
|
|
227
|
+
- `relay status -f` / `relay status --follow`: live-refresh current account status, same 30-second interval as `relay list -f`
|
|
228
|
+
|
|
229
|
+
### v2.2.5 — 2026-07-04
|
|
230
|
+
- `relay list -f` / `relay list --follow`: live-refresh mode — clears the screen and redraws the account table every 30 seconds, Ctrl+C to exit
|
|
231
|
+
|
|
226
232
|
### v2.2.4 — 2026-07-04
|
|
227
233
|
- Fix: `relay switch` from another terminal no longer gets clobbered by a concurrent `relay list` / `!relay` menu run. Root cause: `try_refresh()` in the parallel usage-fetch used a stale snapshot of the current account, causing it to write the old account's refreshed token back to keychain and undo the switch. Now reads `CURRENT_FILE` freshly at write time.
|
|
228
234
|
- Active sessions pick up an account switch on the next message without restarting
|
package/package.json
CHANGED
package/relay
CHANGED
|
@@ -394,6 +394,35 @@ cmd_quick() {
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
cmd_list() {
|
|
397
|
+
# -f / --follow: live-refresh mode
|
|
398
|
+
local follow=0
|
|
399
|
+
local passthrough=()
|
|
400
|
+
for arg in "$@"; do
|
|
401
|
+
if [[ "${arg}" == "-f" || "${arg}" == "--follow" ]]; then
|
|
402
|
+
follow=1
|
|
403
|
+
else
|
|
404
|
+
passthrough+=("${arg}")
|
|
405
|
+
fi
|
|
406
|
+
done
|
|
407
|
+
|
|
408
|
+
if [[ "${follow}" -eq 1 ]]; then
|
|
409
|
+
local interval=30
|
|
410
|
+
trap 'tput cnorm 2>/dev/null; printf "\n \033[2mExited relay list -f\033[0m\n\n"; exit 0' INT TERM
|
|
411
|
+
tput civis 2>/dev/null || true
|
|
412
|
+
while true; do
|
|
413
|
+
printf '\033[2J\033[H'
|
|
414
|
+
hdr "Account List"
|
|
415
|
+
printf " ${D}live · refreshes every ${interval}s · Ctrl+C to exit${R}\n\n"
|
|
416
|
+
_sync_current_creds
|
|
417
|
+
render_table full "${CREDS_STORE}" "${META_STORE}" "$(current_name)" "${passthrough[@]+"${passthrough[@]}"}"
|
|
418
|
+
echo ""
|
|
419
|
+
ok "Inside Claude Code: ${CY}!relay <index>${R} to switch"
|
|
420
|
+
printf "\n ${D}updated $(date '+%H:%M:%S')${R}\n"
|
|
421
|
+
sleep "${interval}"
|
|
422
|
+
done
|
|
423
|
+
return
|
|
424
|
+
fi
|
|
425
|
+
|
|
397
426
|
_check_update_bg
|
|
398
427
|
hdr "Account List"
|
|
399
428
|
_sync_current_creds
|
|
@@ -403,7 +432,7 @@ cmd_list() {
|
|
|
403
432
|
_show_update_notice
|
|
404
433
|
}
|
|
405
434
|
|
|
406
|
-
|
|
435
|
+
_cmd_status_once() {
|
|
407
436
|
_sync_current_creds
|
|
408
437
|
local current; current=$(current_name)
|
|
409
438
|
hdr "Current Status"
|
|
@@ -504,6 +533,29 @@ EOF
|
|
|
504
533
|
[[ -d "${CLAUDE_DIR}/projects" ]] && \
|
|
505
534
|
n=$(find "${CLAUDE_DIR}/projects" -name "*.jsonl" 2>/dev/null | wc -l | tr -d ' ')
|
|
506
535
|
printf "\n ${B}Sessions:${R} %s (shared across all accounts in ~/.claude/projects/)\n" "${n}"
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
cmd_status() {
|
|
539
|
+
local follow=0
|
|
540
|
+
for arg in "$@"; do
|
|
541
|
+
[[ "${arg}" == "-f" || "${arg}" == "--follow" ]] && follow=1
|
|
542
|
+
done
|
|
543
|
+
|
|
544
|
+
if [[ "${follow}" -eq 1 ]]; then
|
|
545
|
+
local interval=30
|
|
546
|
+
trap 'tput cnorm 2>/dev/null; printf "\n \033[2mExited relay status -f\033[0m\n\n"; exit 0' INT TERM
|
|
547
|
+
tput civis 2>/dev/null || true
|
|
548
|
+
while true; do
|
|
549
|
+
printf '\033[2J\033[H'
|
|
550
|
+
printf " ${D}live · refreshes every ${interval}s · Ctrl+C to exit${R}\n\n"
|
|
551
|
+
_cmd_status_once
|
|
552
|
+
printf "\n ${D}updated $(date '+%H:%M:%S')${R}\n"
|
|
553
|
+
sleep "${interval}"
|
|
554
|
+
done
|
|
555
|
+
return
|
|
556
|
+
fi
|
|
557
|
+
|
|
558
|
+
_cmd_status_once
|
|
507
559
|
_check_update_bg
|
|
508
560
|
_show_update_notice
|
|
509
561
|
}
|
|
@@ -1574,7 +1626,9 @@ cmd_help() {
|
|
|
1574
1626
|
printf " %-32s %s\n" " relay save <name>" "save current login state"
|
|
1575
1627
|
printf " %-32s %s\n" " relay rename <old> <new>" "rename an account"
|
|
1576
1628
|
printf " %-32s %s\n" " relay list" "full list with weekly usage"
|
|
1629
|
+
printf " %-32s %s\n" " relay list -f" "live-refresh mode (Ctrl+C to exit)"
|
|
1577
1630
|
printf " %-32s %s\n" " relay list --no-usage" "list without querying API"
|
|
1631
|
+
printf " %-32s %s\n" " relay status -f" "live-refresh current account status"
|
|
1578
1632
|
printf " %-32s %s\n" " relay remove <name>" "delete an account"
|
|
1579
1633
|
printf " %-32s %s\n" " relay sessions" "show all sessions"
|
|
1580
1634
|
printf " %-32s %s\n" " relay version" "show current version"
|