Skip to main content

llm plugins for loading tmux panes

Project description

llm-fragments-tmux

PyPI Changelog Tests License

A plugin for LLM that provides fragments from tmux panes. It allows you to capture the content of a tmux pane and use it as a fragment in LLM prompts, or list available tmux panes for selection.

Installation

Install this plugin in the same environment as LLM.

llm install llm-fragments-tmux

Usage

This plugin provides a tmux fragment for use with LLM's -f/--fragment option.

You can use the content of one or more tmux panes directly in your LLM prompts using positional arguments:

llm -f tmux:1,2:20 "Summarize the following terminal output:"
  • The first field (before the colon) is a comma-separated list of tmux pane ids (e.g., 1,2). Omit for the current pane.
  • The second field (after the colon) is the number of lines from the bottom of the pane(s) to capture (e.g., 20). Omit for all lines.
  • Examples:
    • tmux:1,2:20 — panes 1 and 2, last 20 lines
    • tmux:1 — pane 1, all lines
    • tmux::20 — current pane, last 20 lines
    • tmux: — current pane, all lines (default)

You can also use the fragment in other LLM commands that support -f/--fragment.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-fragments-tmux
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.[test]'

To run the tests:

python -m pytest

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

llm_fragments_tmux-0.1.0a0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

llm_fragments_tmux-0.1.0a0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_fragments_tmux-0.1.0a0.tar.gz.

File metadata

  • Download URL: llm_fragments_tmux-0.1.0a0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_fragments_tmux-0.1.0a0.tar.gz
Algorithm Hash digest
SHA256 dfd20c50470b9f4f8f631d59c64d5c0bddc6e1ca9542ea7457e3190619706cb7
MD5 76f91524a72cbeb93e11bc7b3a49817c
BLAKE2b-256 faf3796c6f2fd71ad0fe15521aa7cfb16a261893f8eb5f85b29e5b65fe928e0a

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_tmux-0.1.0a0.tar.gz:

Publisher: publish.yml on kj-9/llm-fragments-tmux

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

File details

Details for the file llm_fragments_tmux-0.1.0a0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_fragments_tmux-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 34bc07bbac3bee9c827b0cf9a16be7470a39dc2b34fdd08ed2c18e0cb5810b44
MD5 b0a8302df6856a0b5d87aeb801cf0be1
BLAKE2b-256 3d3eb6f9b531f50d419d4d0bf421631afcd48e7eb1f9c20a422ab916bd32b163

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_fragments_tmux-0.1.0a0-py3-none-any.whl:

Publisher: publish.yml on kj-9/llm-fragments-tmux

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