A tiny CLI that outputs files as Markdown-formatted code blocks. Handy for pasting source into prompts for large-language models.
Pass files or glob patterns to inprompt and pipe the result to your clipboard:
inprompt pyproject.toml '**/*.py' | pbcopyNeed a different fence delimiter? Use --fence (or -f):
inprompt -f "~~~" script.py | pbcopyNote: Always quote glob patterns such as '**/*.py' so the shell doesn't expand
them before inprompt sees them.
The | pbcopy (or equivalent) copies the formatted blocks directly to your clipboard:
-
macOS:
pbcopyis built-in. -
Linux: install
xclipand define aliases for convenience:alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o'
Output format:
<filename>
```` ← configurable with --fence / -f
<file contents>
````pip install inprompt