Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7478e35
common(cmd) AsyncTmuxCmd
tony Nov 9, 2025
fd1d0f7
Server,Session,Window,Pane: Add `.acmd`
tony Nov 9, 2025
b3b0039
AsyncTmuxCmd: Updates for TmuxCmd
tony Nov 9, 2025
0bd5f35
fix(AsyncTmuxCmd): Handle text decoding manually for async subprocess
tony Nov 9, 2025
dd3ab56
tests(async) Basic example
tony Nov 9, 2025
4a1eade
py(deps[dev]) Add `pytest-asyncio`
tony Nov 9, 2025
6cfe4c7
test(async): Add Server.acmd() tests
tony Nov 9, 2025
c3c1e4b
test(async): Add Session.acmd() tests
tony Nov 9, 2025
9a6298d
test(async): Add Window.acmd() and Pane.acmd() tests
tony Nov 9, 2025
3718c9e
test(async): Add concurrent operations test
tony Nov 9, 2025
f91bd5d
test(async): Add error handling tests
tony Nov 9, 2025
958cc4a
test(async): Add integration test & use fixture cleanup
tony Nov 9, 2025
41478df
style(test_async): Use set literal instead of tuple
tony Nov 9, 2025
f1d6b0a
refactor(tests): Reorganize async tests into tests/asyncio/
tony Nov 9, 2025
b36ff11
feat(server): Add async wrapper methods ahas_session() and anew_sessi…
tony Nov 9, 2025
372f2d1
test(server): Add comprehensive tests for async wrapper methods
tony Nov 9, 2025
3539229
feat(session): Add async wrapper methods anew_window() and arename_se…
tony Nov 9, 2025
a9eae1b
test(session): Add comprehensive tests for async wrapper methods
tony Nov 9, 2025
81fce7f
feat(window): Add async wrapper method akill()
tony Nov 9, 2025
ef61e02
test(window): Add comprehensive tests for akill() async wrapper
tony Nov 9, 2025
33b94a1
docs(server): Add comprehensive docstrings for async methods
tony Nov 9, 2025
a380005
docs(server): Convert async examples to narrative code blocks
tony Nov 9, 2025
0137b9a
docs(session,window): Add comprehensive docstrings for async methods
tony Nov 9, 2025
6851443
docs: Add comprehensive async documentation
tony Nov 9, 2025
b856360
docs: Add bidirectional linking from sync to async methods
tony Nov 9, 2025
3906ef1
docs: Restore executable async doctests using asyncio.run() pattern
tony Nov 9, 2025
931f0fa
feat: Add critical async pane methods (asend_keys, acapture_pane, asp…
tony Nov 9, 2025
d55389d
test: Add comprehensive unit tests for async pane methods (16 tests)
tony Nov 10, 2025
9633146
test: Add integration tests for async pane workflows (3 tests)
tony Nov 10, 2025
0e877aa
docs: Add bidirectional cross-references between sync and async pane …
tony Nov 10, 2025
baef424
docs: Additional asyncio docs
tony Nov 10, 2025
5fa1584
docs: tidy async docstrings and exports
tony Nov 9, 2025
7909221
tests(asyncio): strengthen pane typing
tony Nov 9, 2025
091c333
tests(asyncio): add dataclasses for session typing
tony Nov 9, 2025
4e59516
tests(asyncio): harden server typing
tony Nov 9, 2025
dc4654e
tests(asyncio): structure integration helpers
tony Nov 9, 2025
ebae247
chore(rebase): restore imports lost during rebase onto post-v0.56.0 m…
tony May 10, 2026
7d39ef4
chore(rebase): Restore has_lt_version import in pane.py
tony Jul 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,47 @@ True

In a real pane tmux has already set those two variables, so `from_env()` takes no arguments and there is nothing to arrange — this README is not running in a pane, so the example sets them first. Outside tmux there is no pane to return, and `from_env()` raises `NotInsideTmux`.

## Async support

libtmux provides async versions of key methods for use in async applications:

```python
import asyncio
from libtmux import Server


async def main():
server = Server()

# Create session asynchronously
session = await server.anew_session(
session_name="async_session", start_directory="~/"
)

# Create windows concurrently
windows = await asyncio.gather(
session.anew_window(window_name="editor"),
session.anew_window(window_name="terminal"),
session.anew_window(window_name="logs"),
)

# Check session exists
exists = await server.ahas_session("async_session")
print(f"Session exists: {exists}") # True


asyncio.run(main())
```

Available async methods (using 'a' prefix convention):
- `Server.ahas_session()` - Check if session exists
- `Server.anew_session()` - Create new session
- `Session.anew_window()` - Create new window
- `Session.arename_session()` - Rename session
- `Window.akill()` - Kill window

See the [async API documentation](https://libtmux.git-pull.com/api/async.html) for details.

## Core concepts

| libtmux object | tmux concept | Notes |
Expand Down
Loading
Loading