Skip to content

feat(cli): Add attachment print to preview content for the LLM#507

Merged
JeanMertz merged 1 commit intomainfrom
prr76
Apr 4, 2026
Merged

feat(cli): Add attachment print to preview content for the LLM#507
JeanMertz merged 1 commit intomainfrom
prr76

Conversation

@JeanMertz
Copy link
Copy Markdown
Collaborator

Adds a new jp attachment print subcommand (alias: p) that shows the rendered text content of an attachment as the LLM would see it. This is useful for debugging or verifying that an attachment resolves and renders as expected before including it in a query.

For text-based attachments the resolved content is printed to stdout. For binary attachments, a message is written to stderr indicating that no preview is available. Multiple attachments from a single URI (e.g. a glob) are printed in sequence, separated by a blank line.

Example usage:

jp attachment print ./src/main.rs
jp attachment p file://./README.md

Adds a new `jp attachment print` subcommand (alias: `p`) that shows the
rendered text content of an attachment as the LLM would see it. This is
useful for debugging or verifying that an attachment resolves and
renders as expected before including it in a query.

For text-based attachments the resolved content is printed to stdout.
For binary attachments, a message is written to stderr indicating that
no preview is available. Multiple attachments from a single URI (e.g. a
glob) are printed in sequence, separated by a blank line.

Example usage:

    jp attachment print ./src/main.rs
    jp attachment p file://./README.md

Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz JeanMertz merged commit a28a042 into main Apr 4, 2026
13 checks passed
@JeanMertz JeanMertz deleted the prr76 branch April 4, 2026 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant