llmprint
llmprint is a CLI tool that prints directory structures and file contents in a clean, LLM-friendly format. It's perfect for generating context when pasting into a chatbot or code assistant.
🚀 Features
- 📂 Recursively includes multiple folders
- ✂️ Skips common clutter using
.gitignore-style rules - 🔍 Include/exclude specific folders and files
- 🧠 Great for LLM prompt preparation, code understanding, or debugging
- 📋 Cross-platform clipboard support
- 🌟 Clean, structured output format
📦 Installation
Option 1: Install from source
git clone https://github.com/rsh3khar/llmprint.git
cd llmprint
pip install .
Option 2: Install from pip
pip install llmprint
⚡️ Usage
Print Directory Structure
# Print structure of current directory
llmprint -s
# Print structure of specific directories
llmprint -s -i src/ tests/
Print File Contents Recursively
# Print contents of specific directories
llmprint -i src/ tests/
# Print all files in current directory
llmprint .
Exclude Specific Folders or Files
# Exclude directories while printing contents
llmprint -i . -e node_modules __pycache__
# Exclude files by pattern (use quotes to prevent shell expansion)
llmprint -i . -e "*.pyc" "*.log"
Copy to Clipboard
# Copy tree structure to clipboard
llmprint -s -c
# Copy file contents to clipboard
llmprint -i src/ -c
# Copy and also print to screen
llmprint -s -c -p
🧠 Why use this?
When prompting an LLM with questions like:
"Can you explain this repo to me?"
"What's the purpose of this function?"
"Can you refactor this?"
You often need to include file structure and contents. llmprint formats this perfectly for large-context pasting — clean, readable, and structured.
🛠 Options
| Option | Description |
|---|---|
-s / --structure |
Print directory structure only |
-i / --include |
Specify folders or files to include |
-e / --exclude |
Specify folders or files to exclude (use quotes for patterns, e.g., "*.pyc") |
-c / --copy |
Copy output to clipboard (suppresses stdout) |
-p / --print |
Print to stdout when using --copy |
If no flag is provided, it defaults to printing the directory structure.
🔧 Requirements
- Python 3.6 or higher
pyperclipfor clipboard operations
📄 License
✨ Author
Raj Shekhar
GitHub: @rsh3khar
Metadata
Release files for llmprint 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llmprint-0.1.2.tar.gz | 6.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llmprint-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / llmprint-0.1.2.tar.gz
| Download URL | llmprint-0.1.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1055708734c33e54e8c04d0e66284bec49cde806461cfcae8a266bcf3f7cab7
|
|
BLAKE2b-256 checksum How to use checksums |
37fe75d187b302f1f6bed236024109f43be8630ddda1b2af7d5f2a364f01dd37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Release files / llmprint-0.1.2-py3-none-any.whl
| Download URL | llmprint-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6ec1dd0f1d0d2e8825d779183f745676ac21d907ff470564d09d38f1e668e2f
|
|
BLAKE2b-256 checksum How to use checksums |
016f9cc5b2edba831799e2a013acdf9afe7814159fa37a2344f2650bca762fd5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.8
|
Security for llmprint 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.