Generate a copyfiles.txt containing project tree + file contents.
Project description
copyfiles-cli
copyfiles-cli is a tiny CLI that scans a project, respects .gitignore-style rules, and produces a single copyfiles.txt with:
- an indented project tree, and
- each kept file’s contents (wrapped in language-tagged code fences).
Perfect for pasting clean, complete context into LLMs or sharing a compact code snapshot.
Installation
pip install copyfiles-cli
# CLI command is `copyfiles`
Requires Python 3.8+
Quick Start
# From your project root
copyfiles
# Writes ./copyfiles.txt (tree + file contents)
Options (short & sweet)
| Flag | Default | What it does |
|---|---|---|
--root PATH |
. |
Directory to scan. |
--out FILE |
copyfiles.txt |
Output file path. |
--config FILE |
– | Extra ignore patterns (one per line, .gitignore syntax). |
--max-bytes N |
100000 |
Truncate each file after N bytes. |
--skip-large KB |
– | Skip files larger than KB kilobytes entirely. |
-v, --verbose |
off | Show scanning/filtering progress. |
--no-color |
off | Disable colored output (or set NO_COLOR=1). |
-V, --version |
– | Print version and exit. |
-h, --help |
– | Show full help. |
Examples
# Minimal: create copyfiles.txt from current directory
copyfiles
# Different output name + lower per-file limit
copyfiles --out project.txt --max-bytes 50_000
# Skip very large binaries/logs and be chatty
copyfiles --skip-large 200 -v
# Use extra ignore rules
copyfiles --config .cfignore
Notes
- Honors your repo’s
.gitignoreplus any patterns you add via--config. - Binary files are skipped automatically.
- The output is plain Markdown so you can paste it directly into ChatGPT/Gemini/Copilot.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
copyfiles_cli-0.1.8.tar.gz
(9.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file copyfiles_cli-0.1.8.tar.gz.
File metadata
- Download URL: copyfiles_cli-0.1.8.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffab4ea40c17894080f64b15b5adcfc14b96fa0d7f82a68ef575a4d1c6dea165
|
|
| MD5 |
36b947a3fbcfbfae4755484b55222fa1
|
|
| BLAKE2b-256 |
9bc85019d8366402a69bcb02ff1e1a110306e5b3cc60688a1e92996fcc596ea2
|
File details
Details for the file copyfiles_cli-0.1.8-py3-none-any.whl.
File metadata
- Download URL: copyfiles_cli-0.1.8-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df4d446c8ada289b50689326a57411daa53019bb5036c795e376bae3109f4741
|
|
| MD5 |
1360e3ef73478fafd25af842340a58be
|
|
| BLAKE2b-256 |
78efafd7e2fe2ea5308a4f7fe1068105362135a0e02ee4aa849839544d2be1c4
|