Java
Drive a real tmux from Java.
io.github.libtmux:libtmux
You are reading the latest documentation. Use the version control in the header to move between releases, or the port dropdown to find a corresponding page in another language.
Install
Library io.github.libtmux:libtmux
The platform BOM names the version once and every other coordinate follows it, which is what stops a project mixing two releases of modules built against each other.
Workspace Manager libtmux-workspace-cli
The workspace package is separate from the core library.
Run from a libtmux-java checkout with JDK 25 or newer. The launcher is libtmux-workspace-cli/build/install/tmux-workspace/bin/tmux-workspace; keep its adjacent libraries.
MCP libtmux-mcp
Choose your client and configuration scope, then run the command or paste the configuration.
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ claude mcp add tmux -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.claude.json (this project)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ claude mcp add tmux --scope user -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.claude.json (all projects)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ claude mcp add tmux --scope project -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: .mcp.json (in repo, version-controlled)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen use this config:
Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: claude_desktop_config.json
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ codex mcp add tmux -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.codex/config.toml
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: .codex/config.toml (in repo)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ gemini mcp add --scope user tmux /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.gemini/settings.json
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ gemini mcp add --scope project tmux /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: .gemini/settings.json (in repo)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen use this config:
Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: .cursor/mcp.json (in repo)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen use this config:
Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.cursor/mcp.json
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ grok mcp add --scope user tmux -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.grok/config.toml
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ grok mcp add --scope project tmux -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ./.grok/config.toml (in repo)
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen use this config:
Nothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.gemini/config/mcp_config.json
Build or install the server first:
$ ./gradlew :libtmux-mcp:installDistThen register:
$ opencode mcp add tmux -- /absolute/path/to/libtmux-mcpNothing publishes this server as a binary yet. The build writes a launcher at libtmux-mcp/build/install/libtmux-mcp/bin/libtmux-mcp; use its absolute path.
Config file: ~/.config/opencode/opencode.jsonc
Topics
Subject-by-subject, with Java in every code block.
Guides
Task guides for Java.
Examples
Complete programs, sourced from the code each port tests.
Concepts
The domain model every port shares.