# tmux-python/libtmux

⚙️ Python API / wrapper for tmux

Repository: https://github.com/tmux-python/libtmux
Canonical: https://ross.abutalabs.com/products/libtmux
Homepage: https://libtmux.git-pull.com
Language: Python
License: MIT
License Family: permissive
Topics: tmux, api, python, python-3, library, cli, terminal
Last push: 2026-08-25T10:58:13+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 92, longevity 100
- inputs: {"age_days": 3755, "days_push": 8, "days_rel": 52, "gap_med": 5, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1203, forks 126 (observed 2026-08-28T04:03:58.635081+00:00)

## What it is
libtmux is a typed, object-oriented Python API for tmux, letting you control servers, sessions, windows, and panes as Python objects instead of parsing shell output. It powers tmuxp and includes a pytest plugin for isolated tmux test fixtures.

## Use cases
- control tmux sessions from python
- automate terminal multiplexer workflows
- create and manage tmux windows and panes programmatically
- write pytest tests with isolated tmux sessions
- script tmux session setup and teardown
- query live tmux sessions without parsing shell output

## When to choose
- you need programmatic, typed control of tmux from Python
- you're building tools like tmuxp that manage tmux workspaces
- you want isolated tmux fixtures in pytest
- you need to traverse or filter live tmux sessions, windows, and panes

## When to avoid
- you just need simple one-off tmux shell commands
- you use tmux older than 3.2a
- you need a stable 1.0 API - libtmux is pre-1.0 and APIs may change

## Facets
- artifact type: library
- maturity: active
- function: developer-tools, cli, testing, workflow-automation
- domain: developer-tools
- platform: python, cli
- tags: tmux, terminal-multiplexer, orm-wrapper, pytest-plugin, session-management, command-line, automation, terminal, linux, macos

## Member repositories
- tmux-python/libtmux (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:58.635081+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:20:33.265779+00:00, confidence not recorded.
  - readme: https://github.com/tmux-python/libtmux (fetched 2026-08-28T04:03:58.635081+00:00, sha 8acaa62e7f81)
  - homepage: https://libtmux.git-pull.com (fetched 2026-08-29T12:27:36.530753+00:00, sha ce727827e1a8)
  - site_page: https://libtmux.git-pull.com/quickstart (fetched 2026-08-29T12:27:36.540399+00:00, sha 302af9a66338)
  - registry_pypi: https://pypi.org/pypi/libtmux/json (fetched 2026-08-29T12:27:36.549121+00:00, sha 8df6f854b99b)
  - site_page: https://libtmux.git-pull.com/history (fetched 2026-08-29T12:27:36.543062+00:00, sha 42657b3534fb)
- Data as of 2026-08-30T08:39:29.467469+00:00.
