.nh .TH "UPTERM" "1" "Jan 2026" "Upterm 0.0.0+dev" "Upterm Manual" .SH NAME upterm-session-current - Display the current terminal session .SH SYNOPSIS \fBupterm session current [flags]\fP .SH DESCRIPTION Display the current terminal session. .PP By default, reads the admin socket path from $UPTERM_ADMIN_SOCKET (automatically set when you run 'upterm host'). .PP Sockets are stored in: /build/.upterm .PP Follows the XDG Base Directory Specification with fallback to $HOME/.upterm in constrained environments where XDG directories are unavailable. .PP Output formats: -o json JSON output -o go-template='{{.ClientCount}}' Custom Go template .PP Template variables: SessionID, ClientCount, Host, Command, ForceCommand .SH OPTIONS \fB--admin-socket\fP="" Admin socket path (required). .PP \fB-h\fP, \fB--help\fP[=false] help for current .PP \fB--hide-client-ip\fP[=false] Hide client IP addresses from output (auto-enabled in CI environments). .PP \fB-o\fP, \fB--output\fP="" Output format: json or go-template='...' .SH OPTIONS INHERITED FROM PARENT COMMANDS \fB--debug\fP[=false] enable debug level logging (log file: /build/.upterm/upterm.log). .SH EXAMPLE .EX # 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}}' .EE .SH SEE ALSO \fBupterm-session(1)\fP .SH HISTORY 14-Jan-2026 Auto generated by spf13/cobra