HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
tmux-python
libtmux
Python2016–2026
tmux-python / libtmux

libtmux

⚙️ Python API / wrapper for tmux

7Distinct people
8Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

⚙️ Python API / wrapper for tmux

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2016-05-24 15:52:06 UTC to 2026-04-08 18:20:34 UTC.

01232016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC321
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC211
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

8 sources
I am moving all my open source projects to `mypy --strict`. Here's the diff of adding basic / --strict mypy types: libvcs: https://github.com/vcs-python/libvcs/pull/362/files, https://github.com/vcs-python/libvcs/pull/390/files libtmux: https://github.com/tmux-python/libtmux/pull/382/files, https://github.com/tmux-python/libtmux/pull/383/files unihan-etl: https://github.com/cihai/unihan-etl/pull/255/files, https://github.com/cihai/unihan-etl/pull/257/files Perks: - code completions (through annotating) - typings can be used downstream (since the above are all now typed python libraries) - maintainability, bug finding + Easy to wire into CI and run locally Longterm, unsure of the return on investment. I do promise to report back if I find it's not worth the effort.
In Using Mypy in Production
A great feature of tmux is that every action can be automated from the command line using commands such as split-window, resize-pane, and select-layout. With the send-keys and capture-pane commands you can even automate interacting with any process running inside tmux. The man page provides a good overview of these commands. There also exists a wrapper for Python [0] and I'm currently working on one for R [1]. [0] https://github.com/tmux-python/libtmux/ [1] https://github.com/datascienceworkshops/tmuxr
In Tmux for Mere Mortals
I haven't used teamocil or tmuxinator in a few years. At the time, both had a few itches to scratch. i was surprised to see how well thought-out and scriptable tmux was. the often overlooked formats [1] and targets [2] options in the tmux manual had a lot of possibilities to do precise tweaks across sessions, windows and panes, but they were cumbersome to articulate. it seemed like a superb candidate to create an object mapper for in python. In recent months, I spun off the low-level python library for mapping sessions, windows and panes to objects to libtmux [3] I will give a try at advantages, but take note its been a while and tmuxinator may have improved on these: 1. focusing a pane in each window, as well as window in the session. So after the session is loaded, the cursor will be focused wherever you entered "focus: true". http://tm
Read the rest
uxp.readthedocs.io/en/latest/examples.html#focusing. tmuxinator's startup_window seems to only do window focusing, not pane focusing. 2. freezing tmux layouts http://tmuxp.readthedocs.io/en/latest/cli.html#freeze-sessio... 3. JSON support 4. More ability to resolve paths relative to configuration file and relative to start_directory. http://tmuxp.readthedocs.io/en/latest/examples.html#start-di... 5. before_script for bootstrapping project dependencies before launch http://tmuxp.readthedocs.io/en/latest/examples.html#bootstra.... Can target bootstrap script via absolute path, relation to start_directory and relation to config directory. 6. Set custom indexes (window numbers) via config These are little conveniences I don't recall seeing in tmuxinator/teamocil in 2013 (I originally used both): - If your tmux session is already loaded, it will offer to attach it for you instead of re-running. (I don't recall if this was tmuxinator or teamocil) - If you're already inside a tmux session and load a session via tmuxp, it will offer to switch-client for you. - There is also an ability to import teamocil and tmuxinator configs, http://tmuxp.readthedocs.io/en/latest/cli.html#import, though it may be out of date with the latest config for them. I'm considering whether I want to remove the feature, or just try to load them natively. It wouldn't be hard. [1] http://www.freebsd.org/cgi/man.cgi?query=tmux&apropos=0&sekt... [2] http://www.freebsd.org/cgi/man.cgi?query=tmux&apropos=0&sekt... [3] https://github.com/tony/libtmux
In Show HN: Tmuxp – Tmux session manager written in Python

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.