Skip to main content

A tiny CLI that outputs files as Markdown-formatted code blocks.

Project description

inprompt

A tiny CLI that outputs files as Markdown-formatted code blocks. Handy for pasting source into prompts for large-language models.

Usage

Pass files or glob patterns to inprompt and pipe the result to your clipboard:

inprompt pyproject.toml '**/*.py' | pbcopy

Need a different fence delimiter? Use --fence (or -f):

inprompt -f "~~~" script.py | pbcopy

Note: 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: pbcopy is built-in.

  • Linux: install xclip and define aliases for convenience:

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

Output format:

<filename>
````         ← configurable with --fence / -f
<file contents>
````

Installation

pip install inprompt

License

MIT License

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.6.0.tar.gz (3.3 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.6.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: inprompt-1.6.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for inprompt-1.6.0.tar.gz
Algorithm Hash digest
SHA256 3f40cea9ade3a2daa86dd6b4cf68604a47a93aeed6d45e151fc450b158897ec6
MD5 40659c71baacd2328dfbcf813705b36f
BLAKE2b-256 775b669924438d00cba65b24c181c32d131ec77de3643c85c820adf8491bb0b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inprompt-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Darwin/24.5.0

File hashes

Hashes for inprompt-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98ca856c94ce0ac1b4b828671218c22e0ac2b24d8ae1b82f04f271740e353846
MD5 56cd3f8d5013a336f355d9136af5767b
BLAKE2b-256 d18c545a99f90871be5a8688cc7b4c5e64ca72da57d3d7c604dc9840563f046d

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