The bridge between your local codebase and LLMs.
Project description
xtrshow
xtrshow is a CLI suite designed to optimize the "Context Injection" and "Code Application" loop when working with AI coding assistants (ChatGPT, Claude, Gemini, etc.).
It solves the two biggest points of friction in AI-assisted development:
- Getting code INTO the LLM: Quickly selecting relevant files and formatting them so the model can reference exact lines.
- Getting code OUT of the LLM: Applying changes safely without manually copy-pasting dozens of snippets.
Installation
pip install xtrshow
xtrshow and xtrpatch Commands: Quickstart
The workflow consists of three steps: Extract, Prompt, Apply.
- Extract Context: Run
xtrshowto interactively select files and copy them to your clipboard.
xtrshow | pbcopy # (MacOS/Linux)
- Prompt: Paste the context into your LLM, then ask it to reply using the Search & Replace Block format. A copy-pasteable instruction block lives in the Prompting Guide.
- Apply: Save the LLM's response to a file (e.g.,
changes.txt) and apply it.
xtrpatch changes.txt
Tip: Iterating on the same set of files? Skip reselection and re-export the last selection with
xtrshow --update.
👉 Read the Full Getting Started Guide
Features
xtrshow (The Extractor)
- Interactive TUI: Browse and select files with a fast, keyboard-driven interface.
- LLM-Optimized Output: Formats code with line numbers and file headers so the model can anchor edits to exact locations.
- Smart Filtering: Automatically ignores noise directories like
node_modules,.git, and build artifacts. - Re-Export: Re-run the last selection without touching the TUI via
--update. - Multi-File Export: Dump separate files for RAG pipelines via
--multi.
xtrpatch (The Patcher)
- Safety First: Automatic, versioned atomic backups for every modified file.
- Checksum Verification: Detects when a file has changed since its last backup, guarding against silent overwrites.
- Robust Matching: "Fuzzy" whitespace matching handles common LLM indentation errors.
- Wildcard Anchors:
~~~~lets the model skip volatile interior lines and anchor only on stable signatures — dramatically reducing failed patches. - Conflict Detection: Catches overlapping edit blocks before they corrupt a file.
- Full Lifecycle: Create files, delete sections, delete whole files (
! DELETE FILE), and modify existing code. - Undo Button: Built-in
--revertcommand to instantly unwind changes.
Prompting the LLM
To use xtrpatch effectively, instruct the LLM to output code as Search and Replace Blocks. Standard git diffs are often too fragile for LLM generation.
We provide a copy-pasteable instruction block for this purpose.
Advanced Workflows
For power users of Google Gemini, we have developed a comprehensive "Developer Protocol" that turns the LLM into a more reliable pair programmer with persistent state management and standardized output formats.
License
Apache 2.0
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
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-0.3.0.tar.gz.
File metadata
- Download URL: xtrshow-0.3.0.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0379eaa91bfb802a50b48eda7a39ba3363673fa4b2a1fe6ad3b058f229e256b4
|
|
| MD5 |
9068b21097ca61859b89fd2d05b3b225
|
|
| BLAKE2b-256 |
4ee5d4bc57807bc32dbda50834adb442e41f1a1d220de8bbd3b6cbde762df153
|
Provenance
The following attestation bundles were made for xtrshow-0.3.0.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-0.3.0.tar.gz -
Subject digest:
0379eaa91bfb802a50b48eda7a39ba3363673fa4b2a1fe6ad3b058f229e256b4 - Sigstore transparency entry: 1989622591
- Sigstore integration time:
-
Permalink:
Aloecraft-org/xtrshow@844f1f28bd3fa3b05ce420013aa139a3ec2b2647 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Aloecraft-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@844f1f28bd3fa3b05ce420013aa139a3ec2b2647 -
Trigger Event:
push
-
Statement type:
File details
Details for the file xtrshow-0.3.0-py3-none-any.whl.
File metadata
- Download URL: xtrshow-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbf62d479e54908e6edb456519cba987d74a8bee59f404dc47f148653433cc98
|
|
| MD5 |
50b7af168a57b58be0a1b0bed9927745
|
|
| BLAKE2b-256 |
07ee3d7e347322ac4ab981c88fbfd88f7a495f5cc94eae6df9f15204927e0a7e
|
Provenance
The following attestation bundles were made for xtrshow-0.3.0-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-0.3.0-py3-none-any.whl -
Subject digest:
fbf62d479e54908e6edb456519cba987d74a8bee59f404dc47f148653433cc98 - Sigstore transparency entry: 1989622785
- Sigstore integration time:
-
Permalink:
Aloecraft-org/xtrshow@844f1f28bd3fa3b05ce420013aa139a3ec2b2647 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Aloecraft-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@844f1f28bd3fa3b05ce420013aa139a3ec2b2647 -
Trigger Event:
push
-
Statement type: