Skip to content

Commit 32075a6

Browse files
committed
docs(configuration): Make env variables linkable via labels
why: LIBTMUX_SAFETY and other env vars should be cross-referenceable from anywhere in the docs, following the pattern used by libtmux. what: - Restructure configuration.md: one heading per env var with MyST labels (LIBTMUX_SOCKET)=, (LIBTMUX_SOCKET_PATH)=, etc. - {ref}`LIBTMUX_SAFETY` now links to configuration/#libtmux-safety - Update safety page and glossary to use {ref} links
1 parent b9e83f5 commit 32075a6

3 files changed

Lines changed: 42 additions & 10 deletions

File tree

docs/configuration.md

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,44 @@ Runtime configuration for the libtmux-mcp server. For MCP client setup, see {ref
66

77
## Environment variables
88

9-
| Variable | Type | Default | Description |
10-
|----------|------|---------|-------------|
11-
| `LIBTMUX_SOCKET` | string | (none) | tmux socket name (`-L`). Isolates the MCP server to a specific tmux socket. |
12-
| `LIBTMUX_SOCKET_PATH` | string | (none) | tmux socket path (`-S`). Alternative to socket name for custom socket locations. |
13-
| `LIBTMUX_TMUX_BIN` | string | `tmux` | Path to tmux binary. Useful for testing with different tmux versions. |
14-
| `LIBTMUX_SAFETY` | string | `mutating` | Safety tier: `readonly`, `mutating`, or `destructive`. See {ref}`safety`. |
9+
(LIBTMUX_SOCKET)=
10+
11+
### `LIBTMUX_SOCKET`
12+
13+
tmux socket name (`-L`). Isolates the MCP server to a specific tmux socket.
14+
15+
- **Type:** string
16+
- **Default:** (none — uses the default tmux socket)
17+
18+
(LIBTMUX_SOCKET_PATH)=
19+
20+
### `LIBTMUX_SOCKET_PATH`
21+
22+
tmux socket path (`-S`). Alternative to socket name for custom socket locations.
23+
24+
- **Type:** string
25+
- **Default:** (none)
26+
27+
(LIBTMUX_TMUX_BIN)=
28+
29+
### `LIBTMUX_TMUX_BIN`
30+
31+
Path to tmux binary. Useful for testing with different tmux versions.
32+
33+
- **Type:** string
34+
- **Default:** `tmux`
35+
36+
(LIBTMUX_SAFETY)=
37+
38+
### `LIBTMUX_SAFETY`
39+
40+
Safety tier controlling which tools are available. See {ref}`safety`.
41+
42+
- **Type:** string
43+
- **Default:** `mutating`
44+
- **Values:** `readonly`, `mutating`, `destructive`
45+
46+
## Setting environment variables
1547

1648
Set environment variables in your MCP client config:
1749

@@ -32,7 +64,7 @@ Set environment variables in your MCP client config:
3264

3365
## Socket isolation
3466

35-
By default, the MCP server connects to the default tmux socket. Set `LIBTMUX_SOCKET` to isolate AI agent activity from your personal tmux sessions:
67+
By default, the MCP server connects to the default tmux socket. Set {ref}`LIBTMUX_SOCKET` to isolate AI agent activity from your personal tmux sessions:
3668

3769
```json
3870
"env": { "LIBTMUX_SOCKET": "ai_workspace" }
@@ -42,4 +74,4 @@ The agent will only see sessions on the `ai_workspace` socket, not your personal
4274

4375
## All tools accept `socket_name`
4476

45-
Every tool accepts an optional `socket_name` parameter that overrides `LIBTMUX_SOCKET` for that call. This allows agents to work across multiple tmux servers in a single session.
77+
Every tool accepts an optional `socket_name` parameter that overrides {ref}`LIBTMUX_SOCKET` for that call. This allows agents to work across multiple tmux servers in a single session.

docs/glossary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Pane
2929
A tmux pane within a window. A pseudoterminal that runs a single process. Has an ID (e.g. `%1`) that is globally unique within a server.
3030
3131
Safety tier
32-
A level controlling which MCP tools are available: `readonly`, `mutating`, or `destructive`. Set via the `LIBTMUX_SAFETY` env var.
32+
A level controlling which MCP tools are available: `readonly`, `mutating`, or `destructive`. Set via the {ref}`LIBTMUX_SAFETY` env var.
3333
3434
Socket
3535
The Unix socket used to communicate with a tmux server. Can be specified by name (`-L`) or path (`-S`).

docs/topics/safety.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ libtmux-mcp uses a three-tier safety system to control which tools are available
1414

1515
## Configuration
1616

17-
Set the safety tier via the `LIBTMUX_SAFETY` environment variable:
17+
Set the safety tier via the {ref}`LIBTMUX_SAFETY` environment variable:
1818

1919
```json
2020
{

0 commit comments

Comments
 (0)