Prism Context Pack (ctxpack) turns a project folder into one prompt you can paste into ChatGPT, Claude, Gemini or any agent. It walks the repo while respecting .gitignore, skips node_modules, build output, binaries, images and lockfiles, and writes a file tree followed by every file in a fenced block (or XML tags). --stats shows which files use the most tokens and how much of each model's context window the pack fills.
- .gitignore-aware walker with built-in ignores (
node_modules,dist,.next,.git, venvsβ¦) - Skips binaries, images, lockfiles, minified files and files over
--max-kb - Markdown (safe nested fences + language tags) or XML output
--include/--excludeglobs,--promptinstructions at the top--stats: token breakdown per file + context-window fit--copyto clipboard (pbcopy / wl-copy / xclip / clip), zero dependencies
# run without installing
npx github:krishyaa06/prism-context-pack . --stats
# or install globally
npm install -g github:krishyaa06/prism-context-pack
ctxpack . -o context.mdRequires Node.js 18.17+. No dependencies.
ctxpack [dir] [options]
-o, --out <file> write to a file (default: stdout)
-f, --format <fmt> markdown | xml
-i, --include <glob> only include matching paths (repeatable)
-x, --exclude <glob> exclude matching paths (repeatable)
-m, --max-kb <n> skip files larger than n KB (default: 200)
-p, --prompt <text> add instructions at the top
--copy copy result to the clipboard
--stats token breakdown instead of the pack
--no-gitignore don't respect .gitignore
ctxpack . -o context.md
ctxpack src -i "**/*.ts" --stats
ctxpack . -x "test/**" -p "Find bugs in this code" --copyprism-context-pack/
βββ assets/
β βββ logo.png
β βββ logo.svg
βββ bin/
β βββ ctxpack.js # CLI entry
βββ examples/
β βββ demo-app/
β βββ src/
β β βββ router.js
β β βββ server.js
β βββ test/
β β βββ router.test.js
β βββ .gitignore
β βββ README.md
βββ src/
β βββ index.js # collect + render
β βββ ui.js # colours, tables
β βββ walk.js # gitignore-aware walker
βββ test/
β βββ ctxpack.test.js
βββ .gitignore
βββ LICENSE
βββ README.md
βββ package.json
npm testTests use the built-in node:test runner, so there is nothing to install. CI runs them on Node 20 and 22.
- Fork the repo and create a branch:
git checkout -b feature/my-idea - Make your change and add a test in
test/ - Run
npm testand open a Pull Request
Prism Context Pack is one of the open-source tools built by Prism Protocol, a tech community where young builders learn, ship and compete together.
![]() Soumya Bhandare Founder @ Prism Protocol |
|
Released under the MIT License.
If you like this project, consider giving it a β
"Build. Create. Compete." Β· Made with β‘ by Prism Protocol


