Dump a project's source files into a single Markdown file for sharing with LLMs.
Project description
context-dump
Dump a project's source files into one Markdown file, ready to paste into an LLM.
Respects .gitignore and never re-includes its own output on re-runs.
Install
pip install .
This registers the context-dump command.
Use
# Dump the current directory
context-dump .
# Dump specific paths
context-dump src/ README.md pyproject.toml
# Custom output file
context-dump . -o my_dump.md
# Ignore .gitignore (include everything the filters allow)
context-dump . --no-gitignore
# Plain text instead of Markdown
context-dump . --format txt
By default the output is written to AI_CONTEXT_<stems>.md in the current working
directory. For context-dump . that's AI_CONTEXT_..md — usually you want to
override with -o, e.g. context-dump . -o context.md.
What it filters
Layered filters, evaluated in order:
- Hard-ignored dirs/files (
IGNORE_DIRS/IGNORE_FILESinai_context/config.py) —node_modules,.git, build outputs, lockfiles, etc. .gitignore— patterns from the repo's.gitignore(and parent.gitignorefiles up to the.gitboundary) are applied on top.- Include filter (
INCLUDE_EXTENSIONS/INCLUDE_FILENAMES) — only these extensions/filenames appear in the tree at all. Empty both = include everything that survived step 2. - Content hiding (
HIDE_CONTENT_FORorONLY_SHOW_CONTENT_FOR) — file appears in the tree, but its body is hidden. Mutually exclusive.
Self-exclusion
Re-running context-dump will not include the previous dump in the next one
(unless you pass --include-self). Without this, every run would grow the file
by its own previous size — guaranteed to hit the size cap eventually.
Configuration
Edit src/ai_context/config.py to change defaults: include filters, ignore
patterns, max file size, format, etc. CLI flags override per-run.
Layout
ai_context_project/
├── pyproject.toml
├── README.md
└── src/
└── ai_context/
├── __init__.py
├── config.py # editable defaults
├── walker.py # filesystem traversal + .gitignore
├── render.py # tree, manifest, fenced file dump
└── cli.py # `context-dump` entry point
```"# context-dump"
#\x00 \x00c\x00o\x00n\x00t\x00e\x00x\x00t\x00-\x00d\x00u\x00m\x00p\x00 \x00 \x00
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
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 context_dump-0.1.0.tar.gz.
File metadata
- Download URL: context_dump-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42f0849c92cd063426bd3640801191447e8a7961178023b9fe031c7f6342136d
|
|
| MD5 |
3929d10f591fa9ff06d90ccb752ccb58
|
|
| BLAKE2b-256 |
72dda355342d15149341e0b44648ddc87b67351446901c5ddf283e8c3786bc5f
|
Provenance
The following attestation bundles were made for context_dump-0.1.0.tar.gz:
Publisher:
publish.yml on MuhammadDev99/context-dump
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_dump-0.1.0.tar.gz -
Subject digest:
42f0849c92cd063426bd3640801191447e8a7961178023b9fe031c7f6342136d - Sigstore transparency entry: 2165085167
- Sigstore integration time:
-
Permalink:
MuhammadDev99/context-dump@55af857773f68597b1ddeefbd63ca503182e17d1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MuhammadDev99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55af857773f68597b1ddeefbd63ca503182e17d1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file context_dump-0.1.0-py3-none-any.whl.
File metadata
- Download URL: context_dump-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94e846d7f2c8938f528f6f762f3de9ca01de6e9d8eeecae20a30a7d3a9e4da93
|
|
| MD5 |
a43c5fec225f82f61437df71694bfd6d
|
|
| BLAKE2b-256 |
74a65027f6fdd9578ec9298063c20b78227dfc8d8b2243cd68edcd903b36887c
|
Provenance
The following attestation bundles were made for context_dump-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on MuhammadDev99/context-dump
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
context_dump-0.1.0-py3-none-any.whl -
Subject digest:
94e846d7f2c8938f528f6f762f3de9ca01de6e9d8eeecae20a30a7d3a9e4da93 - Sigstore transparency entry: 2165085173
- Sigstore integration time:
-
Permalink:
MuhammadDev99/context-dump@55af857773f68597b1ddeefbd63ca503182e17d1 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/MuhammadDev99
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55af857773f68597b1ddeefbd63ca503182e17d1 -
Trigger Event:
release
-
Statement type: