TypeScript
Drive a real tmux from TypeScript.
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 libtmux
Dependency cooldowns
The checkbox turns a cooldown on and off for every picker on the site. It applies to what an install pulls in; the package itself, and the libtmux it pins, stay current.
What are cooldowns?
Cooldowns delay picking up newly uploaded packages so the community has time to spot supply-chain attacks before you install. Most package managers don't apply one by default; you opt in through a global setting in your tool's configuration.
Learn more at cooldowns.dev · Datadog Security Labs writeup.
$ npm install libtmux$ npm install --min-release-age=0 libtmux$ pnpm add libtmux$ pnpm_config_minimum_release_age=0 pnpm add libtmux$ yarn add libtmux$ YARN_NPM_MINIMAL_AGE_GATE=0 yarn add libtmux$ bun add libtmux$ bun add libtmuxBun cannot exempt libtmux from its own cooldown, so a cooldown here would also hold back the release this installs. This command runs without one.
$ bun add --minimum-release-age=0 libtmux Workspace Manager @libtmux/workspace-cli
The workspace package is separate from the core library.
Dependency cooldowns
The checkbox turns a cooldown on and off for every picker on the site. It applies to what an install pulls in; the package itself, and the libtmux it pins, stay current.
What are cooldowns?
Cooldowns delay picking up newly uploaded packages so the community has time to spot supply-chain attacks before you install. Most package managers don't apply one by default; you opt in through a global setting in your tool's configuration.
Learn more at cooldowns.dev · Datadog Security Labs writeup.
$ npx -y @libtmux/workspace-cli --help$ npx -y @libtmux/workspace-cli --helpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release this runs. This command runs without one.
$ npx -y --min-release-age=0 @libtmux/workspace-cli --helpRuns tmux-workspace without installing it. Pass a command such as load ./workspace.yaml in place of --help.
$ bunx --bun @libtmux/workspace-cli --help$ bunx --bun @libtmux/workspace-cli --helpBun cannot exempt @libtmux/workspace-cli from its own cooldown, so a cooldown here would also hold back the release this installs. This command runs without one.
$ bunx --bun --minimum-release-age=0 @libtmux/workspace-cli --help--bun runs the command on Bun. Without it, bunx runs the command on Node when Node is installed, because its shebang names node.
$ pnpm dlx @libtmux/workspace-cli --help$ pnpm_config_minimum_release_age=0 pnpm dlx @libtmux/workspace-cli --help$ yarn dlx @libtmux/workspace-cli --help$ YARN_NPM_MINIMAL_AGE_GATE=0 yarn dlx @libtmux/workspace-cli --helpYarn refuses a release younger than its npmMinimalAgeGate, one day by default.
$ npm install -g @libtmux/workspace-cli$ npm install -g --min-release-age=0 @libtmux/workspace-cliPuts tmux-workspace on PATH, so a workspace loads with tmux-workspace load ./workspace.yaml.
$ pnpm add -g @libtmux/workspace-cli$ pnpm_config_minimum_release_age=0 pnpm add -g @libtmux/workspace-cli$ bun add -g @libtmux/workspace-cli$ bun add -g @libtmux/workspace-cliBun cannot exempt @libtmux/workspace-cli from its own cooldown, so a cooldown here would also hold back the release this installs. This command runs without one.
$ bun add -g --minimum-release-age=0 @libtmux/workspace-cli MCP @libtmux/mcp
Choose your client and configuration scope, then run the command or paste the configuration.
$ claude mcp add tmux -- npx -y @libtmux/mcp
Config file: ~/.claude.json (this project)
$ claude mcp add tmux -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.claude.json (this project)
$ claude mcp add tmux -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ~/.claude.json (this project)
$ claude mcp add tmux --scope user -- npx -y @libtmux/mcp
Config file: ~/.claude.json (all projects)
$ claude mcp add tmux --scope user -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.claude.json (all projects)
$ claude mcp add tmux --scope user -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ~/.claude.json (all projects)
$ claude mcp add tmux --scope project -- npx -y @libtmux/mcp
Config file: .mcp.json (in repo, version-controlled)
$ claude mcp add tmux --scope project -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: .mcp.json (in repo, version-controlled)
$ claude mcp add tmux --scope project -- npx -y --min-release-age=0 @libtmux/mcp
Config file: .mcp.json (in repo, version-controlled)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ claude mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (this project)
Build or install the server first:
Then register:
$ claude mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (this project)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ claude mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (this project)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ claude mcp add tmux --scope user -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (all projects)
Build or install the server first:
Then register:
$ claude mcp add tmux --scope user -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (all projects)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ claude mcp add tmux --scope user -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.claude.json (all projects)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ claude mcp add tmux --scope project -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .mcp.json (in repo, version-controlled)
Build or install the server first:
Then register:
$ claude mcp add tmux --scope project -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .mcp.json (in repo, version-controlled)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ claude mcp add tmux --scope project -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .mcp.json (in repo, version-controlled)
Config file: claude_desktop_config.json
npx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: claude_desktop_config.json
Config file: claude_desktop_config.json
Build or install the server first:
$ npm install --global @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: claude_desktop_config.json
Build or install the server first:
Then use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: claude_desktop_config.json
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: claude_desktop_config.json
$ codex mcp add tmux -- npx -y @libtmux/mcp
Config file: ~/.codex/config.toml
$ codex mcp add tmux -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.codex/config.toml
$ codex mcp add tmux -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ~/.codex/config.toml
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
Config file: .codex/config.toml (in repo)
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
npx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: .codex/config.toml (in repo)
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
Config file: .codex/config.toml (in repo)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ codex mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.codex/config.toml
Build or install the server first:
Then register:
$ codex mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.codex/config.toml
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ codex mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.codex/config.toml
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .codex/config.toml (in repo)
Build or install the server first:
Then register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .codex/config.toml (in repo)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .codex/config.toml (in repo)
$ gemini mcp add --scope user tmux npx -- -y @libtmux/mcp
Config file: ~/.gemini/settings.json
$ gemini mcp add --scope user tmux npx -- -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.gemini/settings.json
$ gemini mcp add --scope user tmux npx -- -y --min-release-age=0 @libtmux/mcp
Config file: ~/.gemini/settings.json
$ gemini mcp add --scope project tmux npx -- -y @libtmux/mcp
Config file: .gemini/settings.json (in repo)
$ gemini mcp add --scope project tmux npx -- -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: .gemini/settings.json (in repo)
$ gemini mcp add --scope project tmux npx -- -y --min-release-age=0 @libtmux/mcp
Config file: .gemini/settings.json (in repo)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ gemini mcp add --scope user tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/settings.json
Build or install the server first:
Then register:
$ gemini mcp add --scope user tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/settings.json
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ gemini mcp add --scope user tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/settings.json
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ gemini mcp add --scope project tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .gemini/settings.json (in repo)
Build or install the server first:
Then register:
$ gemini mcp add --scope project tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .gemini/settings.json (in repo)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ gemini mcp add --scope project tmux libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .gemini/settings.json (in repo)
Config file: .cursor/mcp.json (in repo)
npx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: .cursor/mcp.json (in repo)
Config file: .cursor/mcp.json (in repo)
Config file: ~/.cursor/mcp.json
npx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.cursor/mcp.json
Config file: ~/.cursor/mcp.json
Build or install the server first:
$ npm install --global @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .cursor/mcp.json (in repo)
Build or install the server first:
Then use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .cursor/mcp.json (in repo)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: .cursor/mcp.json (in repo)
Build or install the server first:
$ npm install --global @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.cursor/mcp.json
Build or install the server first:
Then use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.cursor/mcp.json
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.cursor/mcp.json
$ grok mcp add --scope user tmux -- npx -y @libtmux/mcp
Config file: ~/.grok/config.toml
$ grok mcp add --scope user tmux -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.grok/config.toml
$ grok mcp add --scope user tmux -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ~/.grok/config.toml
$ grok mcp add --scope project tmux -- npx -y @libtmux/mcp
Config file: ./.grok/config.toml (in repo)
$ grok mcp add --scope project tmux -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ./.grok/config.toml (in repo)
$ grok mcp add --scope project tmux -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ./.grok/config.toml (in repo)
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ grok mcp add --scope user tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.grok/config.toml
Build or install the server first:
Then register:
$ grok mcp add --scope user tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.grok/config.toml
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ grok mcp add --scope user tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.grok/config.toml
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ grok mcp add --scope project tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ./.grok/config.toml (in repo)
Build or install the server first:
Then register:
$ grok mcp add --scope project tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ./.grok/config.toml (in repo)
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ grok mcp add --scope project tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ./.grok/config.toml (in repo)
Config file: ~/.gemini/config/mcp_config.json
npx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.gemini/config/mcp_config.json
Config file: ~/.gemini/config/mcp_config.json
Build or install the server first:
$ npm install --global @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/config/mcp_config.json
Build or install the server first:
Then use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/config/mcp_config.json
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen use this config:
The package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.gemini/config/mcp_config.json
$ opencode mcp add tmux -- npx -y @libtmux/mcp
Config file: ~/.config/opencode/opencode.jsonc
$ opencode mcp add tmux -- npx -y @libtmux/mcpnpx ignores --min-release-age-exclude, so a cooldown here would also hold back the release it runs; this runs without one. The Global install tab applies a cooldown to the server's dependencies.
Config file: ~/.config/opencode/opencode.jsonc
$ opencode mcp add tmux -- npx -y --min-release-age=0 @libtmux/mcp
Config file: ~/.config/opencode/opencode.jsonc
Build or install the server first:
$ npm install --global @libtmux/mcpThen register:
$ opencode mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.config/opencode/opencode.jsonc
Build or install the server first:
Then register:
$ opencode mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.config/opencode/opencode.jsonc
Build or install the server first:
$ npm install --global --min-release-age=0 @libtmux/mcpThen register:
$ opencode mcp add tmux -- libtmux-mcpThe package installs a `libtmux-mcp` binary. Requires Node 22 or newer, or Bun 1.3.14 or newer.
Config file: ~/.config/opencode/opencode.jsonc
Dependency cooldowns
Use the Configure cooldowns checkbox above to enable or disable. These settings choose how cooldown behaves once enabled.
What are cooldowns?
Cooldowns delay picking up newly uploaded packages so the community has time to spot supply-chain attacks before you install. Most package managers don't apply one by default — you opt in via a global setting in your tool's config.
Learn more at cooldowns.dev · Datadog Security Labs writeup .
Topics
Subject-by-subject, with TypeScript in every code block.
Guides
Task guides for TypeScript.
Examples
Complete programs, sourced from the code each port tests.
Concepts
The domain model every port shares.