@dst-justin/relay 2.2.5 → 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.
Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
  3. package/relay +26 -2
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.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
+
226
229
  ### v2.2.5 — 2026-07-04
227
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
228
231
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dst-justin/relay",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "description": "Multi-account switcher for Claude Code — instant credential swap across macOS, Linux, and Windows",
5
5
  "bin": {
6
6
  "relay": "./relay.js"
package/relay CHANGED
@@ -432,7 +432,7 @@ cmd_list() {
432
432
  _show_update_notice
433
433
  }
434
434
 
435
- cmd_status() {
435
+ _cmd_status_once() {
436
436
  _sync_current_creds
437
437
  local current; current=$(current_name)
438
438
  hdr "Current Status"
@@ -533,6 +533,29 @@ EOF
533
533
  [[ -d "${CLAUDE_DIR}/projects" ]] && \
534
534
  n=$(find "${CLAUDE_DIR}/projects" -name "*.jsonl" 2>/dev/null | wc -l | tr -d ' ')
535
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
536
559
  _check_update_bg
537
560
  _show_update_notice
538
561
  }
@@ -1603,8 +1626,9 @@ cmd_help() {
1603
1626
  printf " %-32s %s\n" " relay save <name>" "save current login state"
1604
1627
  printf " %-32s %s\n" " relay rename <old> <new>" "rename an account"
1605
1628
  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)"
1629
+ printf " %-32s %s\n" " relay list -f" "live-refresh mode (Ctrl+C to exit)"
1607
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"
1608
1632
  printf " %-32s %s\n" " relay remove <name>" "delete an account"
1609
1633
  printf " %-32s %s\n" " relay sessions" "show all sessions"
1610
1634
  printf " %-32s %s\n" " relay version" "show current version"