Skip to main content

LLM fragment & template loaders for tmux scrollback and helpful prompt templates

Project description

llm-fragments-tmux

Expose tmux scrollback to LLM via fragments, and ship shassist-inspired templates.

Install

llm install llm-fragments-tmux            # from PyPI (once published)
# or, local dev:
llm install -e .

Use: fragments

llm -f tmux:current:2000 "Explain the last error"
llm -f tmux:%1:500 "Summarize what happened in pane %1"
llm -f tmux:all:800 "Give me a cross-pane diagnosis"
llm -f tmux:sys -f tmux:current "Given sys+history, propose a safe fix"

Notes: content is limited by tmux history-limit; consider raising it (e.g., set -g history-limit 50000). (GitHub, Stack Overflow)

Use: templates

llm -t shassist:default -f tmux:current "Why did this pip install fail?"
llm -t shassist:command -f tmux:%1:200 "Give only the exact fix command"
llm -t shassist:default -f tmux:all:600 "Plan the next steps across panes"
llm -t shassist:default -f tmux:current "Critique my awk, then improve it"

Don’t want bundled templates? DIY:

llm --system 'You are a shell mentor…' --save shassist-default
llm -t shassist-default -f tmux:current 'Explain last error'

(See LLM templates docs for --save and template usage.) (llm.datasette.io)

How it works

The plugin registers a fragment loader (tmux:) and a template loader (shassist:). The fragment loader calls tmux capture-pane with a default line count based on #{history-limit}, returning one or more fragments (one per pane for all). Template loader returns prompts for a shell assistant.

Credit: Inspired by Answer.AI’s shell_sage. ([shell_sage][6])

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_tmux_fragments-0.1.0.tar.gz (53.4 kB view details)

Uploaded Source

Built Distribution

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

llm_tmux_fragments-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file llm_tmux_fragments-0.1.0.tar.gz.

File metadata

  • Download URL: llm_tmux_fragments-0.1.0.tar.gz
  • Upload date:
  • Size: 53.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for llm_tmux_fragments-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0eecdbe2a6159f66b4a817fc028f0fbf0b30c94681c564288abb8f16150ee786
MD5 cd2722a7f3b2a3544253145323ec2c02
BLAKE2b-256 389778a9d82e45049cf79b143d945affc0b86bac15a2c78086a04dc3dc354acf

See more details on using hashes here.

File details

Details for the file llm_tmux_fragments-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_tmux_fragments-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f73d37c9379553aff047b00eeccc655fcd1f30a882082520fc99863d7d5129c9
MD5 6691b567ef682d93025b197abe65e6dc
BLAKE2b-256 194484ca3a9dec2c094632646919fed1eca9428ac6e8a669319515a1252fb420

See more details on using hashes here.

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