Skip to main content

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, pbcopy copies STDOUT to the clipboard.

  • On Ubuntu/Linux, you can define aliases to replicate pbcopy and pbpaste:

    alias pbcopy='xclip -selection clipboard'
    alias pbpaste='xclip -selection clipboard -o'
    

    Then you can use the same inprompt ... | pbcopy pattern.

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

inprompt-1.0.5.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inprompt-1.0.5-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

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

Hashes for inprompt-1.0.5.tar.gz
Algorithm Hash digest
SHA256 674ecfc44ab80ff083cc98d915f9c420b1ff2d744f96fcafaeac763282214877
MD5 534a69d0ec85b9de0e88dbb4e434e783
BLAKE2b-256 83bf20ef95cbbb944ea83c6405d79a1369b50e111f16b0668f607379e0e1d1b8

See more details on using hashes here.

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

Hashes for inprompt-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 27453a737f5610488f521b12146c749932b4750c2c178ee0a940ba7280ea7419
MD5 7c49edbe220ceee42b272a21eb984675
BLAKE2b-256 8744e2c85fe43ea072856a3dbcf167c0b7e5e3d9644cb6358c56d9a8bedd4e18

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page