LLM fragment & template loaders for tmux scrollback and helpful prompt templates
Project description
llm-tmux-fragments
Expose tmux scrollback to LLM via fragments, and ship shassist-inspired templates.
Install
llm install llm-tmux-fragments # from PyPI
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llm_tmux_fragments-1.0.0.tar.gz.
File metadata
- Download URL: llm_tmux_fragments-1.0.0.tar.gz
- Upload date:
- Size: 53.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
632443e647f8dc66bf57b81f334da257bedbd42051b7cce79c6b4d1de835858c
|
|
| MD5 |
d65e2ed63ec9475c093bbe719274dc08
|
|
| BLAKE2b-256 |
ec978a0fcbdb53ac0444de2d095ff71099b108eb88c47ab144bd6f313af89ba9
|
File details
Details for the file llm_tmux_fragments-1.0.0-py3-none-any.whl.
File metadata
- Download URL: llm_tmux_fragments-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccbebb6d2370bba340dd89895acf5a6d8848ec2d0014b6eb1727f0d0d847dd13
|
|
| MD5 |
49f2dfe5dc33b8ba29626b701d30110d
|
|
| BLAKE2b-256 |
67ad0e965965146502ae4c829d65f408ab7d35e8178f14b861d536fe140c1901
|