Skip to content

Tmux on Windows Powershell - tmux for PowerShell, Windows Terminal, cmd.exe. Includes psmux, pmux, and tmux commands. This is native Powershell Tmux designed for Windows in Rust πŸ¦€

License

Notifications You must be signed in to change notification settings

marlocarlo/psmux

Repository files navigation

╔═══════════════════════════════════════════════════════════╗
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—            β•‘
β•‘   β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•            β•‘
β•‘   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ•”β•             β•‘
β•‘   β–ˆβ–ˆβ•”β•β•β•β• β•šβ•β•β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—             β•‘
β•‘   β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•—            β•‘
β•‘   β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•            β•‘
β•‘     Born in PowerShell. Made in Rust. πŸ¦€                 β•‘
β•‘          Terminal Multiplexer for Windows                 β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

The native Windows tmux. Born in PowerShell, made in Rust.
Full mouse support Β· tmux themes Β· tmux config Β· 76 commands Β· blazing fast

Install Β· Usage Β· Performance Β· Compatibility Β· Features Β· Keys Β· Scripting Β· Config Β· FAQ


psmux

The real tmux for Windows. Not a port, not a wrapper, not a workaround.

psmux is a native Windows terminal multiplexer built from the ground up in Rust. It uses Windows ConPTY directly, speaks the tmux command language, reads your .tmux.conf, and supports tmux themes. All without WSL, Cygwin, or MSYS2.

πŸ’‘ Tip: psmux ships with tmux and pmux aliases. Just type tmux and it works!

πŸ‘€ On Windows πŸ‘‡

psmux in action

Installation

Using WinGet

winget install psmux

Using Cargo

cargo install psmux

This installs psmux, pmux, and tmux binaries to your Cargo bin directory.

Using Scoop

scoop bucket add psmux https://github.com/marlocarlo/scoop-psmux
scoop install psmux

Using Chocolatey

choco install psmux

From GitHub Releases

Download the latest .zip from GitHub Releases and add to your PATH.

From Source

git clone https://github.com/marlocarlo/psmux.git
cd psmux
cargo build --release

Built binaries:

target\release\psmux.exe
target\release\pmux.exe
target\release\tmux.exe

Requirements

  • Windows 10 or Windows 11
  • PowerShell 7+ (recommended) or cmd.exe

Why psmux?

If you've used tmux on Linux/macOS and wished you had something like it on Windows, this is it.

psmux Windows Terminal tabs WSL + tmux
Session persist (detach/reattach) βœ… ❌ ⚠️ WSL only
Synchronized panes βœ… ❌ βœ…
tmux keybindings βœ… ❌ βœ…
Reads .tmux.conf βœ… ❌ βœ…
tmux theme support βœ… ❌ βœ…
Native Windows shells βœ… βœ… ❌
Full mouse support βœ… βœ… ⚠️ Partial
Zero dependencies βœ… βœ… ❌ (needs WSL)
Scriptable (76 commands) βœ… ❌ βœ…

Split panes, multiple windows, session persistence, 76 commands, full mouse, tmux themes, 126+ format variables, 53 vim copy-mode keys. Full details: docs/features.md

Performance

psmux is built for speed. The Rust release binary is compiled with opt-level 3, full LTO, and single codegen unit. Every cycle counts.

Metric psmux Notes
Session creation < 100ms Time for new-session -d to return
New window < 80ms Overhead on top of shell startup
New pane (split) < 80ms Same as window, cached shell resolution
Startup to prompt ~shell launch time psmux adds near-zero overhead; bottleneck is your shell
15+ windows βœ… Stable Stress-tested with 15+ rapid windows, 18+ panes, 5 concurrent sessions
Rapid fire creates βœ… No hangs Burst-create windows/panes without delays or orphaned processes

How it's fast

  • Lazy pane resize : only the active window's panes are resized. Background windows resize on-demand when switched to, avoiding O(n) ConPTY syscalls
  • Cached shell resolution : which PATH lookups are cached with OnceLock, not repeated per spawn
  • 10ms polling : client-server discovery uses tight 10ms polling for sub-100ms session attach
  • Early port-file write : server writes its discovery file before spawning the first shell, so the client connects instantly
  • 8KB reader buffers : small buffer size minimizes mutex contention across pane reader threads

Note: The primary startup bottleneck is your shell (PowerShell 7 takes ~400-1000ms to display a prompt). psmux itself adds < 100ms of overhead. For faster shells like cmd.exe or nushell, total startup is near-instant.

tmux Compatibility

psmux is the most tmux-compatible terminal multiplexer on Windows:

Feature Support
Commands 76 tmux commands implemented
Format variables 126+ variables with full modifier support
Config file Reads ~/.tmux.conf directly
Key bindings bind-key/unbind-key with key tables
Hooks 15+ event hooks (after-new-window, etc.)
Status bar Full format engine with conditionals and loops
Themes 14 style options, 24-bit color, text attributes
Layouts 5 layouts (even-h, even-v, main-h, main-v, tiled)
Copy mode 53 vim keybindings, search, registers
Targets session:window.pane, %id, @id syntax
if-shell / run-shell βœ… Conditional config logic
Paste buffers βœ… Full buffer management

Your existing .tmux.conf works. psmux reads it automatically. Just install and go.

Plugins & Themes

psmux has a full plugin ecosystem β€” ports of the most popular tmux plugins, reimplemented in PowerShell for Windows. Themes, key bindings, session management, clipboard integration, and more.

Browse available plugins and themes: psmux-plugins

Install & manage plugins with a TUI: Tmux Plugin Panel (tppanel) β€” a terminal UI for browsing, installing, updating, and removing plugins and themes.

Plugin Description
psmux-sensible Sensible defaults for psmux
psmux-yank Windows clipboard integration
psmux-resurrect Save/restore sessions
psmux-pain-control Better pane navigation
psmux-prefix-highlight Prefix key indicator
ppm Plugin manager (like tpm)

Themes: Catppuccin Β· Dracula Β· Nord Β· Tokyo Night Β· Gruvbox

Quick start:

# Install the plugin manager
git clone https://github.com/psmux-plugins/ppm "$env:USERPROFILE\.psmux\plugins\ppm"

Then add to your ~/.psmux.conf:

set -g @plugin 'psmux-plugins/ppm'
set -g @plugin 'psmux-plugins/psmux-sensible'
run '~/.psmux/plugins/ppm/ppm.ps1'

Press Prefix + I inside psmux to install the declared plugins.

Usage

Use psmux, pmux, or tmux, they're identical:

# Start a new session
psmux
pmux
tmux

# Start a named session
psmux new-session -s work
tmux new-session -s work

# List sessions
psmux ls
tmux ls

# Attach to a session
psmux attach -t work
tmux attach -t work

# Show help
psmux --help
tmux --help

Mouse Over SSH

psmux has first-class mouse support over SSH when the server runs Windows 11 build 22523+ (22H2+). Click panes, drag-resize borders, scroll, click tabs β€” everything works, from any SSH client on any OS.

Compatibility

Client β†’ Server Keyboard Mouse Notes
Linux β†’ Windows 11 (22523+) βœ… βœ… Full support
macOS β†’ Windows 11 (22523+) βœ… βœ… Full support
Windows 10 β†’ Windows 11 (22523+) βœ… βœ… Full support
Windows 11 β†’ Windows 11 (22523+) βœ… βœ… Full support
WSL β†’ Windows 11 (22523+) βœ… βœ… Full support
Any OS β†’ Windows 10 βœ… ❌ ConPTY limitation (see below)
Any OS β†’ Windows 11 (pre-22523) βœ… ❌ ConPTY limitation (see below)

Local use (no SSH)

Platform Keyboard Mouse
Windows 11 (local) βœ… βœ…
Windows 10 (local) βœ… βœ…

Mouse works perfectly when running psmux locally on both Windows 10 and 11.

Why no mouse over SSH on Windows 10?

Windows 10's ConPTY consumes mouse-enable escape sequences internally and does not forward them to sshd. The SSH client never receives the signal to start sending mouse data. This is a Windows 10 ConPTY limitation that was fixed in Windows 11 (build 22523+). Keyboard input works fully on both versions β€” only mouse over SSH is affected.

Recommendation: Use Windows 11 build 22523+ (22H2 or later) as your psmux server for full SSH mouse support.

Key Bindings

Default prefix: Ctrl+b (same as tmux). Full reference: docs/keybindings.md

Key Action
Prefix + c Create new window
Prefix + % / " Split pane horizontally / vertically
Prefix + Arrow Navigate between panes
Prefix + d Detach from session
Prefix + z Toggle pane zoom
Prefix + [ Enter copy/scroll mode (53 vim keybindings)
Ctrl+q Quit

Scripting & Automation

76 tmux-compatible commands, hooks, targets, capture-pane, pipe-pane. Full reference: docs/scripting.md

Configuration

Reads ~/.psmux.conf, ~/.tmux.conf, or ~/.config/psmux/psmux.conf. Fully tmux-compatible syntax β€” your existing config works. Full reference: docs/configuration.md

License

MIT


Contributing

Contributions welcome β€” bug reports, PRs, docs, and test scripts via GitHub Issues.

If psmux helps your Windows workflow, consider giving it a ⭐ on GitHub!

docs/faq.md Β· docs/features.md Β· docs/keybindings.md Β· docs/scripting.md Β· docs/configuration.md


Made with ❀️ for PowerShell using Rust πŸ¦€

About

Tmux on Windows Powershell - tmux for PowerShell, Windows Terminal, cmd.exe. Includes psmux, pmux, and tmux commands. This is native Powershell Tmux designed for Windows in Rust πŸ¦€

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages