@dst-justin/relay 2.2.4 → 2.2.5
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 +3 -0
- package/package.json +1 -1
- package/relay +30 -0
package/README.md
CHANGED
|
@@ -223,6 +223,9 @@ Sessions live in `~/.claude/projects/` and are shared across all accounts — af
|
|
|
223
223
|
|
|
224
224
|
## Changelog
|
|
225
225
|
|
|
226
|
+
### v2.2.5 — 2026-07-04
|
|
227
|
+
- `relay list -f` / `relay list --follow`: live-refresh mode — clears the screen and redraws the account table every 30 seconds, Ctrl+C to exit
|
|
228
|
+
|
|
226
229
|
### v2.2.4 — 2026-07-04
|
|
227
230
|
- 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
231
|
- 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
|
|
@@ -1574,6 +1603,7 @@ cmd_help() {
|
|
|
1574
1603
|
printf " %-32s %s\n" " relay save <name>" "save current login state"
|
|
1575
1604
|
printf " %-32s %s\n" " relay rename <old> <new>" "rename an account"
|
|
1576
1605
|
printf " %-32s %s\n" " relay list" "full list with weekly usage"
|
|
1606
|
+
printf " %-32s %s\n" " relay list -f" "live-refresh list (Ctrl+C to exit)"
|
|
1577
1607
|
printf " %-32s %s\n" " relay list --no-usage" "list without querying API"
|
|
1578
1608
|
printf " %-32s %s\n" " relay remove <name>" "delete an account"
|
|
1579
1609
|
printf " %-32s %s\n" " relay sessions" "show all sessions"
|