No description
  • Go 83.4%
  • Shell 16.1%
  • Makefile 0.5%
Find a file
2026-05-19 14:35:28 +02:00
.github use sanad to pin the action versions 2026-05-19 14:35:28 +02:00
docs docs: add changelog entry for version 1.1.1 native auto-updater release 2026-05-09 22:53:53 +02:00
pkg refactor: ignore errors from resource cleanup operations in update logic 2026-05-09 22:55:08 +02:00
utils fix(install.sh): update to match GoReleaser archive naming 2026-05-09 15:03:03 +02:00
.gitignore chore: add dist/ directory to gitignore 2026-05-09 14:58:28 +02:00
.goreleaser.yaml refactor: project overhaul and major 1.0.0 release 2026-05-09 14:46:35 +02:00
go.mod refactor: project overhaul and major 1.0.0 release 2026-05-09 14:46:35 +02:00
go.sum fix: track go.sum and remove *.sum from .gitignore 2026-05-09 14:50:18 +02:00
LICENSE Initial commit 2024-06-05 08:40:45 +00:00
main.go refactor: project overhaul and major 1.0.0 release 2026-05-09 14:46:35 +02:00
Makefile refactor: project overhaul and major 1.0.0 release 2026-05-09 14:46:35 +02:00
README.md Update README.md 2026-05-10 14:05:19 +02:00

txm: Terminal Session Manager

txm is a unified command-line interface for managing terminal multiplexer sessions. It supports tmux, zellij, and GNU Screen through a single consistent set of commands, with automatic backend detection and native shell completions.


Installation

Downloads and installs the latest release automatically.

User-local (installs to ~/.local/bin):

curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | bash

System-wide (installs to /usr/local/bin, requires root):

curl -s https://raw.githubusercontent.com/MohamedElashri/txm/main/utils/install.sh | sudo bash -s -- --system

The installer also handles the man page and shell completions automatically.

Pre-built Binaries

Download the appropriate archive for your platform from the releases page:

Platform Archive
Linux x86_64 txm_Linux_x86_64.zip
Linux arm64 txm_Linux_arm64.zip
macOS x86_64 txm_Darwin_x86_64.zip
macOS arm64 txm_Darwin_arm64.zip

After downloading, extract and install:

unzip txm_Linux_x86_64.zip
./txm install          # user-local (~/.local/bin)
# or
./txm install --system # system-wide (/usr/local/bin) — requires sudo

Build from Source

Requirements: Go 1.24+, and at least one multiplexer installed.

git clone https://github.com/MohamedElashri/txm
cd txm
make build
./bin/txm install      # user-local
# or
sudo ./bin/txm install --system

Autocompletion

Shell completions are installed automatically during txm install for bash, zsh, and fish.

Shell Completion path (user)
Bash ~/.local/share/bash-completion/completions/txm
Zsh ~/.zfunc/_txm
Fish ~/.config/fish/completions/txm.fish

Zsh only: add fpath+=~/.zfunc to your ~/.zshrc before the compinit call.

For a temporary session, or for PowerShell, generate on the fly:

source <(txm completion bash)   # bash
source <(txm completion zsh)    # zsh
txm completion fish | source    # fish
txm completion powershell       # powershell

Quick Start

# Create and attach to a session
txm create my-project
txm attach my-project

# List sessions
txm list

# Create a window inside the session
txm new-window my-project editor

# Split the window vertically
txm split-window my-project editor v

# Delete the session when done
txm delete my-project

Configuration

txm selects a backend in this priority order:

  1. TXM_DEFAULT_BACKEND environment variable (one-off override)
  2. ~/.txm/config file (persistent)
  3. Auto-detection: tmux → zellij → screen
# Set your preferred backend
txm config set backend zellij

# View current settings
txm config show

# One-off override
TXM_DEFAULT_BACKEND=tmux txm create my-session

Commands

Session Management

Command Description
txm create <name> Create a new session
txm list List all active sessions
txm attach <name> Attach to an existing session
txm detach Detach from the current session
txm delete <name> Delete a session
txm rename-session <old> <new> Rename a session
txm nuke Kill all sessions

Window Management

Command Description
txm new-window <session> [name] Create a new window/tab
txm list-windows <session> List windows in a session
txm kill-window <session> <window> Remove a window
txm rename-window <session> <old> <new> Rename a window
txm next-window <session> Switch to next window
txm prev-window <session> Switch to previous window
txm move-window <src-session> <window> <dst-session> Move window between sessions
txm swap-window <session> <w1> <w2> Swap two windows
txm split-window <session> <window> <v|h> Split a window into panes

Pane Management

Command Description
txm list-panes <session> <window> List panes in a window
txm kill-pane <session> <window> <pane> Remove a pane
txm resize-pane <session> <window> <pane> <U|D|L|R> <size> Resize a pane
txm send-keys <session> <window> <pane> <keys> Send keystrokes to a pane

Utility

Command Description
txm config set backend <tmux|zellij|screen> Set default backend
txm config get backend Show current backend
txm config show Show all configuration
txm install [--system] Install binary, man page, and completions
txm uninstall Remove txm and all its files
txm version Show version
txm completion <bash|zsh|fish|powershell> Generate shell completion script

Note

: Session and window names may only contain alphanumeric characters, dashes (-), and underscores (_).


Backend Support

Feature tmux zellij GNU Screen
Session management
Window operations
Session rename
Move window
Swap window
Pane split (vertical)
Pane split (horizontal)
Pane targeting by number ✗ (focus-based)

Pane targeting notes:

  • tmux: Directly targets panes by number (0, 1, 2, …)
  • zellij: Navigates to the target pane via focus commands (best-effort)
  • screen: Basic splitting only; no per-pane addressing

Environment Variables

Variable Description
TXM_DEFAULT_BACKEND Override the active backend (tmux, zellij, screen)
NO_COLOR Disable colored output
TERM Used for terminal capability detection

Documentation


Uninstallation

txm uninstall removes the binary, man page, and all shell completion files automatically.

txm uninstall          # user-local installation
sudo txm uninstall     # system-wide installation

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

GNU General Public License v3.0 — see LICENSE