Skip to content

Commit 7b802ee

Browse files
committed
docs(configuration): Use Sphinx {envvar} directive and role for env vars
why: Sphinx has a built-in envvar system that creates proper anchors, index entries, and inline-code-styled cross-references — better than manual labels with {ref}. what: - Replace manual (LABEL)= + ### headings with {envvar} directives - Replace {ref}`LIBTMUX_SAFETY` with {envvar}`LIBTMUX_SAFETY` in safety page and glossary - Renders as code-styled links (like {ref} for tools) - Auto-generates index entries for each env var
1 parent 32075a6 commit 7b802ee

3 files changed

Lines changed: 12 additions & 16 deletions

File tree

docs/configuration.md

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

77
## Environment variables
88

9-
(LIBTMUX_SOCKET)=
10-
11-
### `LIBTMUX_SOCKET`
9+
```{envvar} LIBTMUX_SOCKET
10+
```
1211

1312
tmux socket name (`-L`). Isolates the MCP server to a specific tmux socket.
1413

1514
- **Type:** string
1615
- **Default:** (none — uses the default tmux socket)
1716

18-
(LIBTMUX_SOCKET_PATH)=
19-
20-
### `LIBTMUX_SOCKET_PATH`
17+
```{envvar} LIBTMUX_SOCKET_PATH
18+
```
2119

2220
tmux socket path (`-S`). Alternative to socket name for custom socket locations.
2321

2422
- **Type:** string
2523
- **Default:** (none)
2624

27-
(LIBTMUX_TMUX_BIN)=
28-
29-
### `LIBTMUX_TMUX_BIN`
25+
```{envvar} LIBTMUX_TMUX_BIN
26+
```
3027

3128
Path to tmux binary. Useful for testing with different tmux versions.
3229

3330
- **Type:** string
3431
- **Default:** `tmux`
3532

36-
(LIBTMUX_SAFETY)=
37-
38-
### `LIBTMUX_SAFETY`
33+
```{envvar} LIBTMUX_SAFETY
34+
```
3935

4036
Safety tier controlling which tools are available. See {ref}`safety`.
4137

@@ -64,7 +60,7 @@ Set environment variables in your MCP client config:
6460

6561
## Socket isolation
6662

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:
63+
By default, the MCP server connects to the default tmux socket. Set {envvar}`LIBTMUX_SOCKET` to isolate AI agent activity from your personal tmux sessions:
6864

6965
```json
7066
"env": { "LIBTMUX_SOCKET": "ai_workspace" }
@@ -74,4 +70,4 @@ The agent will only see sessions on the `ai_workspace` socket, not your personal
7470

7571
## All tools accept `socket_name`
7672

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.
73+
Every tool accepts an optional `socket_name` parameter that overrides {envvar}`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 {ref}`LIBTMUX_SAFETY` env var.
32+
A level controlling which MCP tools are available: `readonly`, `mutating`, or `destructive`. Set via the {envvar}`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 {ref}`LIBTMUX_SAFETY` environment variable:
17+
Set the safety tier via the {envvar}`LIBTMUX_SAFETY` environment variable:
1818

1919
```json
2020
{

0 commit comments

Comments
 (0)