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).

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.

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.

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.6.tar.gz (2.8 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.6-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file inprompt-1.0.6.tar.gz.

File metadata

  • Download URL: inprompt-1.0.6.tar.gz
  • Upload date:
  • Size: 2.8 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.6.tar.gz
Algorithm Hash digest
SHA256 025d1bd5045ecc47bde7ef33f165ce45fcbd5fc614d9d2ceb4a3a8edd9a24da6
MD5 4d0c3c8fd75941d2dd57d7304a8f4716
BLAKE2b-256 e999fb58594d2da699969b6bf20d6f1c72af099c371b9d892dd031f3a7f25596

See more details on using hashes here.

File details

Details for the file inprompt-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: inprompt-1.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d2aae1cda06dbecf288764bc16bd77fbbe7b32f74331d1aabacb0960fba1c8cf
MD5 22cc39fa962cd8707a1ea799a8437129
BLAKE2b-256 71a5a051c663e58139500810c558e8be6ca0316582cc3231f26aeeb0779a3383

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