Skip to main content

ContextPack

Convert a directory tree to a single Markdown file for LLM context -- offline, no dependencies. Python 3.8+, stdlib only (os). No network at runtime.

Usage

python3 contextpack.py ./myproject -o context.md
python3 contextpack.py ./myproject --ext py md txt

CRON example

# Nightly context snapshot for docs review
0 2 * * * cd /path/to/contextpack && python3 contextpack.py /data/repo -o /tmp/context.md

Limitations

Skips very large files (default 100KB). Skips .git and node_modules. UTF-8 with replacement on decode errors.

ContextPack auto-excludes common secret files (.env, id_rsa, *.pem, ...). Always review context.md before sharing it with any third party / LLM.

Free and open source (MIT license, see LICENSE). No telemetry, no network calls, no nagware.

Part of the PlainKitBin toolset -- small, offline, single-file utilities with automated tests and a provenance record for every release. If you find this useful, check out PlainKitBin DirSnapshot.

Provided as-is with no individual support.


Built with AI assistance and automatically tested before release; released under human oversight.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plainkitbin_contextpack-1.0.3.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plainkitbin_contextpack-1.0.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file plainkitbin_contextpack-1.0.3.tar.gz.

File metadata

  • Download URL: plainkitbin_contextpack-1.0.3.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for plainkitbin_contextpack-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c2f893b80756ef8cd594e9910751833d12d9ba35f67a6eada6798c3b6c0599a3
MD5 f6f73aa90cf1c4e4a046022d5979a5bd
BLAKE2b-256 f877800b2369f98649befeaf92894296bd0c8785eeb285da4d9e6bb0c81190a2

See more details on using hashes here.

File details

Details for the file plainkitbin_contextpack-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for plainkitbin_contextpack-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5116eb154dce7309780a32274aa674a70ca67c5b9d92055c54999b17d3729480
MD5 dd79e36af4c3e9f3f6ed8c8ed12284fe
BLAKE2b-256 e7f50fcc20c2f5c995dd6949f669541cb15df0e082efee1e8c87976a8e9cd562

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 Sentry Error logging StatusPage Status page