Skip to main content

Offline directory-to-markdown packer for LLM context windows. Stdlib only, no network at runtime.

Project description

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.

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

plainkitbin_contextpack-1.0.1.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.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for plainkitbin_contextpack-1.0.1.tar.gz
Algorithm Hash digest
SHA256 adc5f16b27c1cadc364f1eae6638749f17b14d94b4bcac369eb4e2bc1ae871d6
MD5 477d2c2b961942efe0c5a96d8a95b43a
BLAKE2b-256 8d0d53fe9ff1fa82e5fe78905367771100c0d64f4ac51e24a76d9569c4d8fd65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plainkitbin_contextpack-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6631cc011281124beb515444ff4b06f0369374b5c34b5114617bb27b8eb0bde0
MD5 3b8363707ba6dfc0ad96e5634882e39b
BLAKE2b-256 d9a2d674d81de0cf2dc7fef82a593d4bbcf9419b571087ebc39eb74c7ff90699

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