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.1.tar.gz (3.4 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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: inprompt-1.6.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for inprompt-1.6.1.tar.gz
Algorithm Hash digest
SHA256 6cd5cd83afba2c9a475b35ccefaae93635634513fe4246161ba96b9aabc60976
MD5 30e4e9d19473e4b341b637f035cc9ae8
BLAKE2b-256 71ed8cfc3a217b7d7766eede5a489847f7168b4551b46081401b060068014f36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inprompt-1.6.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for inprompt-1.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad270ce60b63a8918b6c39f6395ab6a523eb3369944345e2587a6833aea61590
MD5 4f671765c78b2f40ca6007a575230e5d
BLAKE2b-256 e2467333478fb27936768b4f1c31a0c411acecccf5b9decf9bece1f898afc749

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