Skip to content

About

🧳 Pack a repo into one LLM-ready prompt β€” .gitignore-aware, skips binaries & lockfiles, Markdown or XML output, file tree, token stats, clipboard copy. Zero dependencies. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Prism Context Pack

Typing SVG

CI Node.js Zero dependencies License

Prism Context Pack screenshot

⚑ Overview

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.

✨ Features

  • .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 / --exclude globs, --prompt instructions at the top
  • --stats: token breakdown per file + context-window fit
  • --copy to clipboard (pbcopy / wl-copy / xclip / clip), zero dependencies

πŸš€ Quick Start

# run without installing
npx github:krishyaa06/prism-context-pack . --stats

# or install globally
npm install -g github:krishyaa06/prism-context-pack
ctxpack . -o context.md

Requires Node.js 18.17+. No dependencies.

πŸ› οΈ Usage

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" --copy

πŸ“ Project Structure

prism-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

πŸ§ͺ Tests

npm test

Tests use the built-in node:test runner, so there is nothing to install. CI runs them on Node 20 and 22.

🀝 Contributing

  1. Fork the repo and create a branch: git checkout -b feature/my-idea
  2. Make your change and add a test in test/
  3. Run npm test and open a Pull Request

πŸ”· Part of Prism Protocol

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.

πŸ‘€ Author

Soumya Bhandare
Soumya Bhandare

Founder @ Prism Protocol
Discord
Instagram
X

πŸ“„ License

Released under the MIT License.

If you like this project, consider giving it a ⭐
"Build. Create. Compete." · Made with ⚑ by Prism Protocol

About

🧳 Pack a repo into one LLM-ready prompt β€” .gitignore-aware, skips binaries & lockfiles, Markdown or XML output, file tree, token stats, clipboard copy. Zero dependencies. By Prism Protocol

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages