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.0.tar.gz (4.6 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.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: plainkitbin_contextpack-1.0.0.tar.gz
  • Upload date:
  • Size: 4.6 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.0.tar.gz
Algorithm Hash digest
SHA256 a59bbd1f59fbfd82417c1efbc3c3f28faa9103a36d8b000e1ee63d835624e92a
MD5 4aea765dc3c63fc54f613975581a16fe
BLAKE2b-256 b876cd09b31ebc2209b8472d48df2987b038e6f004f0e60f76571e09f392786b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for plainkitbin_contextpack-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66953061e23e64bf6ec6d96d7add6dd06a47995b8a82a949ff4fddc6cb8df30c
MD5 73cb6f7beae6b9cce406d19018e4a47a
BLAKE2b-256 8c6e46c63434d1162de02d47f6e8c5e82d16b2f6eda2ccfc8190162f7afd67d7

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