PrintProject (pp) โ A lightning-fast CLI tool to bundle your codebase into a single context file for LLMs (ChatGPT, Claude, DeepSeek). Features smart prioritization, interactive history, and gitignore support.
npm install @uxname/ppPrintProject is a blazing fast CLI tool designed to prepare your codebase for Large Language Models (LLMs).
It scans your directory, ignores the junk (binaries, locks, node_modules), intelligently prioritizes critical files (
like package.json or README), and concatenates everything into a single text output.
New: Now includes a Code Cleanup tool to strip comments from your project!
- ๐ Fast & Lightweight: Built with Bun, runs anywhere Node.js runs.
- ๐ง Context-Aware: Automatically puts package.json, docs, and entry points at the top of the file.
- ๐ก๏ธ Smart Filtering:
- Respects .gitignore.
- Automatically excludes binary files, lockfiles, and huge directories (node_modules, .git, dist).
- Skips files larger than 1MB by default.
- ๐งน Code Cleanup: Safely remove all comments from JS/TS files (.ts, .js, .tsx, .jsx) to reduce token usage
or minify code.
- ๐ Interactive History: Run pp without arguments to select from your recent commands.
- ๐ clipboard-ready: Output to a file or pipe directly to stdout.
Install globally via npm:
``bash`
npm install -g @uxname/pp
Scan the current directory and generate a text file for LLMs.
`bashBasic usage
pp
$3
Remove all comments (
// ..., / ... /) from JavaScript and TypeScript files in a directory.> โ ๏ธ Warning: This command modifies files in place. Always commit your changes before running!
Dry Run (Check what will happen):
See which files will be modified without actually touching them.
`bash
pp strip --dry-run
`Execute Cleanup:
This will ask for confirmation before proceeding.
`bash
pp strip
or
pp strip ./src
`Force Execute (No Prompt):
Useful for scripts or CI/CD.
`bash
pp strip -y
`โ๏ธ Options & Flags
$3
| Flag | Description |
|-----------------------|-------------------------------------------------------------------------|
|
-o, --output | Specify the output file path. |
| -s, --stdout | Print to stdout instead of creating a file. |
| --exclude | Add custom glob patterns to exclude (e.g. --exclude "*.css"). |
| --no-gitignore | Disable .gitignore parsing (scan everything except default excludes). |$3
| Flag | Description |
|------------------|-------------------------------------------------------------|
|
-d, --dry-run | Show which files would be processed without modifying them. |
| -y, --yes | Skip confirmation prompt (Danger!). |
| -e, --exclude | Exclude patterns from stripping. |
| --no-gitignore | Disable .gitignore parsing. |๐ง How it Sorts (Priority Rules)
pp sorts files to maximize LLM understanding:1. Manifests:
package.json, Cargo.toml, etc.
2. Documentation: README.md, Dockerfile.
3. Entry Points: index.ts, main.go.
4. Config: Configuration files.
5. Source Code: Files in src/, lib/.
6. Tests: Test files are placed last.๐ซ Default Exclusions
pp automatically ignores:- Directories:
.git, node_modules, dist, build, coverage, .vscode, __pycache__, etc.
- Files: Lockfiles (package-lock.json, yarn.lock), .DS_Store, .env.
- Extensions: Images, videos, archives, binaries.๐ Development
If you want to contribute or build locally:
`bash
Clone repository
git clone https://github.com/uxname/pp.git
cd ppInstall dependencies
bun installRun in dev mode
bun run devBuild for production
bun run build
``MIT