# LibTmux::Model::Session

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Model.rakumod#L910
- **Bases:** [`LibTmux::Model::View`](/en/raku/latest/reference/libtmux-model-view/)
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-session/

Captured session with local window-link and group relationships.

Captured session with local window-link and group relationships.

## Members

### Collections and queries

- [`window-links`](/en/raku/latest/reference/libtmux-model-session-window-links/) (method): Captured session/index associations, including repeated links to one physical window.

### Common operations

- [`id`](/en/raku/latest/reference/libtmux-model-session-id/) (method): Captured ` session_id `; local session-id access.
- [`name`](/en/raku/latest/reference/libtmux-model-session-name/) (method): Captured ` session_name `; local text access.
- [`created`](/en/raku/latest/reference/libtmux-model-session-created/) (method): Captured ` session_created `; local uint access.
- [`current-link`](/en/raku/latest/reference/libtmux-model-session-current-link/) (method): The session-relative active window placement in this observation.
- [`path`](/en/raku/latest/reference/libtmux-model-session-path/) (method): Captured ` session_path `; local text access.
- [`group`](/en/raku/latest/reference/libtmux-model-session-group/) (method): Observed session group, or Nil when the session is known to be ungrouped.
- [`grouped`](/en/raku/latest/reference/libtmux-model-session-grouped/) (method): Captured ` session_grouped `; local bool access.

### Other members

- [`activity`](/en/raku/latest/reference/libtmux-model-session-activity/) (method): Captured ` session_activity `; local uint access.
- [`attached-count`](/en/raku/latest/reference/libtmux-model-session-attached-count/) (method): Captured ` session_attached `; local uint access.
- [`group-name`](/en/raku/latest/reference/libtmux-model-session-group-name/) (method): Captured ` session_group `; local text access.
- [`windows-count`](/en/raku/latest/reference/libtmux-model-session-windows-count/) (method): Captured ` session_windows `; local uint access.

## Inherited members

- [`bytes`](/en/raku/latest/reference/libtmux-model-session-bytes/) (method), inherited from `LibTmux::Model::View`: Exact captured bytes, before strict text conversion or normalization.
- [`clone`](/en/raku/latest/reference/libtmux-model-session-clone/) (method), inherited from `LibTmux::Model::View`: Copy this captured value without changing its records or acquiring new data.
- [`incarnation`](/en/raku/latest/reference/libtmux-model-session-incarnation/) (method), inherited from `LibTmux::Model::View`: Return the captured daemon identity without refreshing it.
- [`new`](/en/raku/latest/reference/libtmux-model-session-new/) (method), inherited from `LibTmux::Model::View`: Refuse direct view construction; obtain this value from a Snapshot.
- [`ref`](/en/raku/latest/reference/libtmux-model-session-ref/) (method), inherited from `LibTmux::Model::View`: Construct a value-only command target without observing current daemon state.
- [`relation`](/en/raku/latest/reference/libtmux-model-session-relation/) (method), inherited from `LibTmux::Model::View`: Resolve one declared relation locally; incomplete required data raises MissingData.
- [`same-entity`](/en/raku/latest/reference/libtmux-model-session-same-entity/) (method), inherited from `LibTmux::Model::View`: Compare scoped entity identity; window links additionally require the same snapshot.
- [`snapshot`](/en/raku/latest/reference/libtmux-model-session-snapshot/) (method), inherited from `LibTmux::Model::View`: Return the retained captured graph; it owns no live transport.
- [`state`](/en/raku/latest/reference/libtmux-model-session-state/) (method), inherited from `LibTmux::Model::View`: Report availability of a declared field or relation without conflating null and unloaded data.
- [`value`](/en/raku/latest/reference/libtmux-model-session-value/) (method), inherited from `LibTmux::Model::View`: Return a decoded local field, Nil for known null, or throw MissingData for unavailable data.

## In other ports

A tmux session

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Session`](/en/py/latest/reference/libtmux-session/) (class) |
| Ruby | [`LibTmux::Session`](/en/ruby/latest/reference/libtmux-session-nvps/) (class) |
| Lua | [`libtmux.Session`](/en/lua/latest/reference/libtmux-session/) (class) |
| PowerShell | [`LibTmux\Get-TmuxSession`](/en/powershell/latest/reference/libtmux-get-tmuxsession/) (cmdlet). This cmdlet reads and returns shared .NET `LibTmux.Session` objects. Child windows and panes require further acquisition. |
| Julia | [`LibTmux.SessionSnapshot`](/en/julia/latest/reference/libtmux-sessionsnapshot/) (struct). `SessionSnapshot` holds captured session data. Actions use its `SessionRef`, a typed identity bound to an observed daemon generation. |
| Erlang | [`#tmux_model:session{}`](/en/erlang/latest/reference/tmux_model-session/) (struct) |
| Elixir | [`LibTmux.Session`](/en/elixir/latest/reference/libtmux-session/) (struct). `Session` is an immutable observation. Fields not captured read as `:unloaded`. |
| Haskell | [`LibTmux.Snapshot.Session`](/en/haskell/latest/reference/libtmux-snapshot-t-session/) (data-type). `Session` is a detached physical session. `WindowLink` records each placement of a window in it, and operations take a generation-bound `SessionRef`. |
| Common Lisp | [`libtmux:session`](/en/lisp/latest/reference/libtmux-session-type/) (class). `session` is an immutable captured entity. The same name also has a relation accessor with a distinct public identity. |
| TypeScript | [`session.Session`](/en/ts/latest/reference/session-session/) (class) |
| Rust | [`session.Session`](/en/rs/latest/reference/session-session/) (struct) |
| Go | [`tmux.Session`](/en/go/latest/reference/tmux-session/) (struct) |
| Java | [`io.github.libtmux.Session`](/en/java/latest/reference/io-github-libtmux-session-session/) (class) |
| Clojure | [`libtmux.core/sessions!`](/en/clojure/latest/reference/libtmux-core-sessions/) (function). Acquires a vector of captured session maps. The session value is a map, not a wrapper class. |
| Kotlin | [`io.github.libtmux.kotlin.Session`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-session/) (class) |
| Scala | [`io.github.libtmux.scaladsl.Session`](/en/scala/latest/reference/io-github-libtmux-scaladsl-session/) (typealias) |
| C# | [`LibTmux.Session`](/en/csharp/latest/reference/libtmux-session/) (class) |
| F# | [`LibTmux.FSharp.Session`](/en/fsharp/latest/reference/libtmux-fsharp-session/) (module). This F# module builds deferred child queries from a shared .NET `LibTmux.Session` and its server association. `Query.list` acquires their results from tmux. |
| C++ | [`libtmux::Session`](/en/cxx/latest/reference/libtmux-session/) (class) |
| Swift | [`Session`](/en/swift/latest/reference/session/) (struct) |
| OCaml | [`Libtmux.Session.t`](/en/ocaml/latest/reference/libtmux-session-t/) (typealias) |
| Perl | [`LibTmux::Session`](/en/perl/latest/reference/libtmux-session/) (class). A captured read-only entity; explicit Server operations accept its stable identity. |
