Simple CLI to output source code blocks for LLM prompts
Project description
inprompt
A tiny CLI for outputting files or glob patterns as Markdown code blocks. Useful when you need to copy code into prompts for large language models (e.g., ChatGPT).
Installation
Option 1: With pip
pip install inprompt
This installs the inprompt command on your system or in your virtual environment.
Option 2: With pipx
pipx install inprompt
This installs inprompt globally, isolated from your system's site packages.
Usage
From the command line, you can do something like:
inprompt pyproject.toml '**/*.py' | pbcopy
-
On macOS,
pbcopycopies STDOUT to the clipboard. -
On Ubuntu/Linux, you can define aliases to replicate
pbcopyandpbpaste:alias pbcopy='xclip -selection clipboard' alias pbpaste='xclip -selection clipboard -o'
Then you can use the same
inprompt ... | pbcopypattern.
Any matched files will be printed in the format:
<filename>
```
<file contents>
```
You can then paste those code blocks into an LLM prompt.
License
MIT - free to use, modify, and distribute.
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 inprompt-1.0.5.tar.gz.
File metadata
- Download URL: inprompt-1.0.5.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
674ecfc44ab80ff083cc98d915f9c420b1ff2d744f96fcafaeac763282214877
|
|
| MD5 |
534a69d0ec85b9de0e88dbb4e434e783
|
|
| BLAKE2b-256 |
83bf20ef95cbbb944ea83c6405d79a1369b50e111f16b0668f607379e0e1d1b8
|
File details
Details for the file inprompt-1.0.5-py3-none-any.whl.
File metadata
- Download URL: inprompt-1.0.5-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.9 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27453a737f5610488f521b12146c749932b4750c2c178ee0a940ba7280ea7419
|
|
| MD5 |
7c49edbe220ceee42b272a21eb984675
|
|
| BLAKE2b-256 |
8744e2c85fe43ea072856a3dbcf167c0b7e5e3d9644cb6358c56d9a8bedd4e18
|