Skip to main content

A small tmux-like terminal multiplexer written in Python.

Project description

muxer

logo

muxer is a small tmux-like multiplexer implemented in Python. It focuses on a narrower feature set:

  • persistent background sessions
  • multiple terminal tabs backed by real PTYs
  • a status bar
  • keyboard navigation between terminals
  • page-based scrollback
  • session save/restore to YAML

It is intentionally a lightweight, hackable alternative rather than a full tmux replacement. The current UI is tab-oriented rather than split-pane-oriented.

Install

pip install .

This exposes the muxer executable.

Commands

muxer new work
muxer attach work
muxer save work
muxer restore ~/.muxer/sessions/work.yaml --name work-restored
muxer ls
muxer kill work

If a session does not exist, muxer attach NAME will fail. muxer new NAME starts the daemon and immediately attaches a client.

Client shortcuts

muxer now uses a Screen-like command prefix so normal application keys pass through to the terminal. The default prefix is Ctrl+A.

  • Ctrl+A c: open a new terminal tab
  • Ctrl+A d: detach the client and leave the daemon running
  • Ctrl+A k: kill the current terminal tab
  • Ctrl+A a: rename the current terminal tab
  • Ctrl+A p: move to the previous tab
  • Ctrl+A n: move to the next tab
  • Ctrl+A 0..9: jump to a tab by index
  • Ctrl+A s: save the session to ~/.muxer/sessions/<name>.yaml
  • Ctrl+A PageUp / Ctrl+A PageDown: scroll the active terminal
  • Ctrl+A Ctrl+A: send a literal prefix character through to the running program

After Ctrl+A a, muxer enters a simple inline rename mode: type the new name, press Enter to confirm, Backspace to edit, or Esc to cancel.

You can change the prefix with MUXER_PREFIX=c-b muxer attach work, muxer --prefix c-b attach work, or muxer attach work --prefix c-b.

Save and Restore

The YAML save file stores, for each terminal:

  • tab id and tab name
  • best-effort current working directory
  • a best-effort environment snapshot
  • the launch shell
  • a tail of recent plain-text output for reference

Running processes are not checkpointed. On restore, muxer starts fresh shells, changes to the saved directory, and reuses the saved environment where possible.

For better $PWD and environment capture, muxer injects a small shell hook for bash and zsh that refreshes state every prompt.

State Directory

By default, muxer stores runtime sockets and save files under ~/.muxer. If that location is not writable, it falls back to a per-user temporary directory. You can override the location explicitly with MUXER_HOME=/path/to/state.

:bot:

Coded with Alphabet Gemini and OpenAI Codex

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

muxer-0.2.0.tar.gz (295.0 kB view details)

Uploaded Source

Built Distribution

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

muxer-0.2.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file muxer-0.2.0.tar.gz.

File metadata

  • Download URL: muxer-0.2.0.tar.gz
  • Upload date:
  • Size: 295.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for muxer-0.2.0.tar.gz
Algorithm Hash digest
SHA256 89c75faa15ef7f5b3698b8562e14ab1a728daf80f385a3d3e0ee8913278d4085
MD5 a91b87de3ed71e49bd3e8983efba5208
BLAKE2b-256 4d0fd67a9a6bdeb617c98b0db5f150e7c776bd0d6ce6e7502fb3506105bf2852

See more details on using hashes here.

Provenance

The following attestation bundles were made for muxer-0.2.0.tar.gz:

Publisher: python-publish.yml on telatin/muxer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file muxer-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: muxer-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for muxer-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ff763cf04fa5d24758382361e34e0a9bfe83c9d6ee9dc06398d69113b18c437
MD5 523418937996bbd4a86d40f02c3b98f9
BLAKE2b-256 91491dccb764fa4061ccf381f100c5902734b73c541e512f2ffdd5301d494772

See more details on using hashes here.

Provenance

The following attestation bundles were made for muxer-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on telatin/muxer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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