# Install and load a workspace

Source: https://libtmux.org/en/dotnet/latest/workspace/guides/installation/

> Install the prerelease .NET workspace CLI from NuGet and load a session on a private tmux socket.

Install and run the native .NET `tmux-workspace` command from its NuGet
prerelease, `LibTmux.Workspace.Cli`. **This is a partial, prerelease
implementation.**

## Install from NuGet

Use a Unix environment with tmux 3.2a or newer on `PATH` for this walkthrough.

Installing needs the .NET SDK 8 or newer. The tool runs on the .NET 8 or
.NET 10 runtime on Unix. For an SDK outside the platform's default
installation location, set `DOTNET_ROOT` to that installation directory
before running the tool.

```console
$ dotnet tool install \
    --global \
    --prerelease \
    LibTmux.Workspace.Cli
```

`--prerelease` is required: every release so far carries an `-alpha` tag,
and NuGet skips those unless asked. A global tool installs into
`~/.dotnet/tools`; add that directory to `PATH` if the SDK reports it
missing.

Inspect the installed command:

```console
$ tmux-workspace --help
```

## Create the input

Keep this shell open for the walkthrough. Create a temporary directory for
its configuration and private tmux socket:

```console
$ WORKSPACE_TMP="$(mktemp -d)"
```

Write a minimal configuration with two blank shell panes to
[`workspace.yaml`](./#create-the-input) inside that directory:

```console
$ cat > "$WORKSPACE_TMP/workspace.yaml" <<'YAML'
session_name: workspace-guide
windows:
  - window_name: editor
    layout: even-horizontal
    panes: [null, null]
YAML
```

## Load and inspect

Load detached on the temporary socket. The JSON result describes the load;
`-d` prevents terminal attachment:

```console
$ tmux-workspace load \
    -S "$WORKSPACE_TMP/tmux.sock" \
    -d \
    --json \
    "$WORKSPACE_TMP/workspace.yaml"
```

Inspect the two panes through the same endpoint:

```console
$ tmux \
    -S "$WORKSPACE_TMP/tmux.sock" \
    list-panes \
    -t '=workspace-guide:editor'
```

Attach with tmux when ready:

```console
$ tmux \
    -S "$WORKSPACE_TMP/tmux.sock" \
    attach-session \
    -t '=workspace-guide'
```

Detach with your configured tmux detach binding. Capture the live session
without choosing a file destination:

```console
$ tmux-workspace freeze \
    -S "$WORKSPACE_TMP/tmux.sock" \
    --json \
    workspace-guide
```

Capture reports recoverable live state. It cannot reconstruct the original
command history, script or plugin definitions. Remove the walkthrough session
when finished:

```console
$ tmux \
    -S "$WORKSPACE_TMP/tmux.sock" \
    kill-session \
    -t '=workspace-guide'
```

The configuration remains in the temporary directory until you remove it.
Every tmux command above addresses that private socket.

## Current limits

Native `--log-level` filters optional diagnostics. On Linux x64, human load
displays progress on terminal stderr and `load --log-file` appends structured
logs. See the [load reference](../../cli/load/#progress-and-script-output) and
[output reference](../../reference/output/) for settings, resize and log-failure
limits.

Human prompts and full terminal workflows, plugin and custom-builder
validation, contextual completion, and the full configuration and platform
corpus remain unfinished.

Python-specific shell behavior requires an interpreter with tmuxp 1.74.0
installed. Select it with `TMUX_WORKSPACE_PYTHON`. Ordinary native loading of
this example does not require Python.

## Python alternative

For the separate released tmuxp application, install its isolated Python
tool environment with uv:

```console
$ uv tool install tmuxp
```

Follow the [Python installation guide](/py/latest/workspace/guides/installation/)
for that workflow. Installing tmuxp does not install the native command.

## Continue

[Discovery](../discovery/), [configuration](../../configuration/) and the
[load reference](../../cli/load/) explain the tmuxp compatibility model. Compare
those references with the local command's help and the limits above.
[Export and reload](../export-session/) explains the capture workflow, and the
[compatibility reference](../../reference/compatibility/) records builder gaps.
Use [Internals](../../internals/) for the library and consumer APIs.

[tmuxp reference source](https://github.com/tmux-python/tmuxp/blob/618b398acc05506d3c682906c36cdeb29dcfa1ff/src/tmuxp/cli/__init__.py).
