# Workspace configuration

Source: https://libtmux.org/en/csharp/latest/workspace/configuration/

> Define the session, windows, panes and commands loaded by the workspace CLI.

A workspace document describes one tmux session. Save this as `configuration.yaml`:

```yaml title="configuration.yaml"
session_name: configuration-example
windows:
  - window_name: editor
    layout: even-horizontal
    panes:
      - printf ready
      - null
```

Load it on the private socket from the
[installation walkthrough](https://libtmux.org/en/csharp/latest/workspace/guides/installation/):

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

The CLI parses the document and validates its execution fields before creating
windows and sending commands. YAML and JSON use the same field names. A successful
load means construction and command delivery completed; pane applications can
still be starting or failing independently.

## Choose the fields for your task

- [Session](https://libtmux.org/en/csharp/latest/workspace/configuration/session/) sets the name, shared options and environment.
- [Windows](https://libtmux.org/en/csharp/latest/workspace/configuration/windows/) sets indexes, layouts and option timing.
- [Panes](https://libtmux.org/en/csharp/latest/workspace/configuration/panes/) defines commands, launch shells and focus.
- [Commands](https://libtmux.org/en/csharp/latest/workspace/configuration/commands/) controls ordering, Enter and delays.
- [Environment](https://libtmux.org/en/csharp/latest/workspace/configuration/environment/) separates loader settings from pane variables.
- [Directories](https://libtmux.org/en/csharp/latest/workspace/configuration/directories/) explains discovery and working directories.
- [Layouts](https://libtmux.org/en/csharp/latest/workspace/configuration/layouts/) arranges the panes.
- [Hooks](https://libtmux.org/en/csharp/latest/workspace/configuration/hooks/) runs checked bootstrap programs and optional extensions.

## CLI and application code

These pages describe the `tmux-workspace` executable. Application code uses the
separate [workspace library](https://libtmux.org/en/csharp/latest/workspace/internals/), whose accepted fields and build
semantics have their own contract. A successful generic [conversion](https://libtmux.org/en/csharp/latest/workspace/cli/convert/)
preserves document values; it does not validate that a loader can execute them.

[CLI source](https://github.com/libtmux/libtmux-dotnet/blob/f77fe776ba67a04abb20ddbbc26cf4a000d63b74/src/LibTmux.Workspace.Cli/README.md).
