Skip to main content

Windows Terminal + tmux session picker via SSH

Project description

wt-tmux-picker

Automatically register Windows Terminal profiles that open an interactive tmux session picker for your SSH hosts.

When you open a registered profile, a TUI dropdown lists your live tmux sessions. Select one to attach, or press Escape to open a plain SSH shell.

  Select tmux session on devbox:

  ┌────────────────────┐
  │ > main             │
  │   work             │
  │   logs             │
  └────────────────────┘

  ↑/↓ to move, Enter to select, Escape for plain SSH

Prerequisites

  • Windows Terminal
  • Python 3.12
  • SSH key authentication (no password prompts) configured for each host
  • tmux installed on remote hosts
  • fzf installed on remote hosts

Install

uv add wt-tmux-picker

or with pip:

pip install wt-tmux-picker

Usage

Setup

Reads ~/.ssh/config, connects to each host via SSH to check for tmux and fzf, then registers a Windows Terminal profile for each qualifying host.

wt-tmux-picker setup

Options:

Flag Description
--user NAME SSH username to use for all hosts
--ssh-config PATH Path to SSH config (default: ~/.ssh/config)
--dry-run Preview actions without making changes

Cleanup

Remove registered profiles. With no arguments, an interactive TUI lets you choose which profiles to remove.

wt-tmux-picker cleanup               # TUI picker
wt-tmux-picker cleanup devbox        # remove one host
wt-tmux-picker cleanup devbox prod   # remove specific hosts

Options:

Flag Description
--dry-run Preview removals without making changes

Attach (used by profiles internally)

Invoked automatically by Windows Terminal profiles. You can also call it directly.

wt-tmux-picker attach devbox
wt-tmux-picker attach devbox --user alice

Development

Local Setup

Clone the repo and install in editable mode:

git clone https://github.com/mahsoommoosa42/wt-tmux-picker.git
cd wt-tmux-picker
uv sync --extra dev

Using Local tmux-manager for Development

If you're also developing tmux-manager, you can use your local version instead of the PyPI release:

# Clone tmux-manager in a sibling directory
cd ..
git clone https://github.com/mahsoommoosa42/tmux-manager.git
cd wt-tmux-picker

# Add to pyproject.toml [tool.uv.sources]:
# [tool.uv.sources]
# tmux-manager = {path = "../tmux-manager", editable = true}

# Then sync dependencies:
uv sync --extra dev

This will install tmux-manager from your local clone instead of PyPI.

Run Tests

uv run pytest --cov=wt_tmux_picker --cov-report=term-missing

All tests must pass at 100% branch coverage before submitting a PR.

Project Structure

See CLAUDE.md for detailed architecture, module documentation, testing patterns, and design decisions.

Contributing

Opening a Pull Request

  1. Fork and clone: Fork the repo, then clone your fork locally
  2. Create a branch: git checkout -b fix/issue-name or feat/feature-name
  3. Set up development: Follow the "Local Setup" section above
  4. Make changes: Write code, add tests, update docs as needed
  5. Run tests: Ensure uv run pytest --cov-fail-under=100 passes
  6. Commit: Write clear, concise commit messages
  7. Push: git push origin your-branch
  8. Open PR: Open a pull request on GitHub with a description of your changes

Guidelines

  • All new code must have 100% branch test coverage
  • Follow existing code style (see CLAUDE.md for patterns)
  • Update README.md if adding new features or subcommands
  • Use TmuxManager from tmux-manager for all tmux operations (don't add new SSH logic to this repo)

License

GNU General Public License v3. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wt_tmux_picker-1.1.0.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wt_tmux_picker-1.1.0-py3-none-any.whl (26.9 kB view details)

Uploaded Python 3

File details

Details for the file wt_tmux_picker-1.1.0.tar.gz.

File metadata

  • Download URL: wt_tmux_picker-1.1.0.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wt_tmux_picker-1.1.0.tar.gz
Algorithm Hash digest
SHA256 dd00526df72b35a115219ca0fc3e2aa042694e737c01723a607e120f88d3bc92
MD5 2fb8fdd7b79673567ba73fad92a43a1e
BLAKE2b-256 995d9dcdffc2a7342f42414b08d6235e91bd90fb19f4b228aa3aad9241d55305

See more details on using hashes here.

File details

Details for the file wt_tmux_picker-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: wt_tmux_picker-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for wt_tmux_picker-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eaffc59b191204b72250884d7850916b6e58029d39c7364297bd11e88a181f0
MD5 7f7eb9511fd949b4dd05c3357dbf4209
BLAKE2b-256 73ccac2f75e6d02875f685beee5320e99677aeff02d76ae673fdb058fb8a36b2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page