UPTERM(1)

NAME
upterm-session-current - Display the current terminal session

SYNOPSIS
upterm session current [flags]

DESCRIPTION
Display the current terminal session.

By default, reads the admin socket path from $UPTERM_ADMIN_SOCKET (automatically set when you run 'upterm host').

Sockets are stored in: /build/.upterm

Follows the XDG Base Directory Specification with fallback to $HOME/.upterm in constrained environments where XDG directories are unavailable.

Output formats:
  -o json JSON output
  -o go-template='{{.ClientCount}}' Custom Go template

Template variables: SessionID, ClientCount, Host, Command, ForceCommand

OPTIONS
--admin-socket=""
    Admin socket path (required).

-h, --help[=false]
    help for current

--hide-client-ip[=false]
    Hide client IP addresses from output (auto-enabled in CI environments).

-o, --output=""
    Output format: json or go-template='...'

OPTIONS INHERITED FROM PARENT COMMANDS
--debug[=false]
    enable debug level logging (log file: /build/.upterm/upterm.log).

EXAMPLE
      # Display the active session as defined in $UPTERM_ADMIN_SOCKET:
      upterm session current
      # Output as JSON:
      upterm session current -o json
      # Custom format for shell prompt (outputs nothing if not in session):
      upterm session current -o go-template='🆙 {{.ClientCount}} '
      # For terminal title:
      upterm session current -o go-template='upterm: {{.ClientCount}} clients | {{.SessionID}}'

SEE ALSO
upterm-session(1)

HISTORY
2-Sep-2026 Auto generated by spf13/cobra