xtrshow
xtrshow is a CLI suite that closes the loop between your local codebase and AI coding assistants (ChatGPT, Claude, Gemini, etc.). It removes the two biggest points of friction in AI-assisted development:
- Getting code INTO the LLM — interactively select files and format them with line numbers so the model can anchor edits to exact locations.
- Getting code OUT of the LLM — apply the model's changes safely, atomically, and reversibly, without copy-pasting dozens of snippets.
No API keys, no agents, no daemons. It works with any chat interface — including free tiers — because the "protocol" is just text.
Installation
pip install xtrshow
Installs two commands: xtrshow (the extractor) and xtrpatch (the patcher).
Quickstart: Extract → Prompt → Apply
1. Extract context. Select files in the TUI; the formatted output goes to stdout:
xtrshow | pbcopy # macOS
xtrshow | xclip -sel c # Linux
xtrshow | clip # Windows
2. Prompt. Paste the context into your LLM along with the patch-format instructions:
xtrshow -p # prints a copy-pasteable instruction block
3. Apply. Save the LLM's reply to a file and apply it:
xtrpatch changes.txt
Made a mistake? xtrpatch --revert changes.txt unwinds every file the patch touched.
Tip: Iterating on the same files?
xtrshow --updatere-exports your last selection without opening the TUI.
👉 Read the Full Getting Started Guide
Why not just use git diffs?
LLMs are unreliable at producing valid unified diffs — line numbers drift, context lines get hallucinated, and one bad hunk poisons the file. xtrpatch uses a Search & Replace block format designed around how models actually fail:
- Fuzzy whitespace matching absorbs the indentation errors models constantly make.
- Wildcard anchors (
~~~~) let the model match on stable signatures and skip volatile interior lines. - Tail context disambiguates near-duplicate blocks with a lookahead check.
- Per-hunk annotations (
@ why this change) surface in the apply report, so failures are self-describing and feed straight back into the LLM for self-correction.
Features
xtrshow (The Extractor)
- Interactive TUI: fast, keyboard-driven file selection with directory expand/collapse and live size stats.
- LLM-optimized output: line-numbered content with
--- a/pathheaders the patcher can target. - Smart filtering: ignores
node_modules,.git, build artifacts, and friends by default (--no-ignoreto disable). - Re-export:
--updatereplays your last selection from the saved manifest. - Multi-file export:
--multiwrites one file per selection — useful for RAG pipelines. - Prompt printer:
-pemits the LLM instruction block for the patch format.
xtrpatch (The Patcher)
- Safety first: automatic, versioned backups in
.xtrpatch/before every modification. - Checksum verification: warns when a file was edited outside the patch loop since the last apply.
- Conflict detection: overlapping hunks are caught pre-flight and skipped, never blindly stacked.
- Full lifecycle: modify, insert, create files, delete sections, delete whole files (
! DELETE FILE). - Idempotent: re-applying a patch detects already-applied hunks and skips them.
- Error reports: failed applies generate a
.rpterrbundle (original + patch + log) you can paste straight back to the LLM. - Undo button:
--revertrestores the most recent backup — per file, or for every file in a patch.
License
Apache 2.0
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 xtrshow-1.0.1.tar.gz.
File metadata
- Download URL: xtrshow-1.0.1.tar.gz
- Upload date:
- Size: 36.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bab9668b6e294a2ee9253966797655258c597b3d6b1f38275ca377c1c1ace2be
|
|
| MD5 |
d50ffc715b1ffeb7d2c39ddf835ea5af
|
|
| BLAKE2b-256 |
d4e73b0bf895872c90fd1a533ad1242aa0e2823c434fcca8ba7916c39aa1785c
|
Provenance
The following attestation bundles were made for xtrshow-1.0.1.tar.gz:
Publisher:
publish.yml on Aloecraft-org/xtrshow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xtrshow-1.0.1.tar.gz -
Subject digest:
bab9668b6e294a2ee9253966797655258c597b3d6b1f38275ca377c1c1ace2be - Sigstore transparency entry: 2253003292
- Sigstore integration time:
-
Permalink:
Aloecraft-org/xtrshow@16c0d841732111281dcde4b3a89bf11cd0dff2ee -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Aloecraft-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16c0d841732111281dcde4b3a89bf11cd0dff2ee -
Trigger Event:
push
-
Statement type:
File details
Details for the file xtrshow-1.0.1-py3-none-any.whl.
File metadata
- Download URL: xtrshow-1.0.1-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60c85f418d58f273d56848aaa6303761f8da495fed06fabc498ef04089493cf5
|
|
| MD5 |
766f7ffdb4b1a05be1fa40b0d65d1ed3
|
|
| BLAKE2b-256 |
cad5ade53b95aa0af9977c3d862182ae2bdcfa807995d3631d8bb1615d052e9a
|
Provenance
The following attestation bundles were made for xtrshow-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on Aloecraft-org/xtrshow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xtrshow-1.0.1-py3-none-any.whl -
Subject digest:
60c85f418d58f273d56848aaa6303761f8da495fed06fabc498ef04089493cf5 - Sigstore transparency entry: 2253003646
- Sigstore integration time:
-
Permalink:
Aloecraft-org/xtrshow@16c0d841732111281dcde4b3a89bf11cd0dff2ee -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Aloecraft-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16c0d841732111281dcde4b3a89bf11cd0dff2ee -
Trigger Event:
push
-
Statement type: