Development

Install git and uv

Clone:

$ git clone https://github.com/tmux-python/libtmux-mcp.git
$ cd libtmux-mcp

Install:

$ uv pip install -e . -G dev

Testing

$ uv run pytest

Run a specific test file:

$ uv run pytest tests/test_pane_tools.py

Run a specific test:

$ uv run pytest tests/test_pane_tools.py::test_send_keys

Watch mode:

$ uv run ptw .

Linting

$ uv run ruff check .

Format:

$ uv run ruff format .

Auto-fix:

$ uv run ruff check . --fix --show-fixes

Type checking

$ uv run mypy

Documentation

Build:

$ just build-docs

Serve with auto-reload:

$ just start-docs

Workflow

  1. Format: uv run ruff format .

  2. Test: uv run pytest

  3. Lint: uv run ruff check . --fix --show-fixes

  4. Types: uv run mypy

  5. Verify: uv run pytest

Releasing

Releases are published to PyPI via GitHub Actions when a tag is pushed:

$ git tag v0.1.0
$ git push --tags

The CI workflow builds the package, creates attestations, and publishes via OIDC trusted publishing.