Skip to content

Latest commit

 

History

History
100 lines (68 loc) · 2.43 KB

File metadata and controls

100 lines (68 loc) · 2.43 KB

ContextPack

A CLI tool that analyzes your codebase and generates token-optimized context bundles for AI coding sessions.

What It Does

ContextPack scans your project, extracts symbols, dependencies, and file summaries, then bundles everything into a single structured context file. Feed it to your AI assistant once instead of re-explaining your codebase every session.

Key Features:

  • Automatic codebase analysis and summarization
  • Token-optimized output formats
  • Smart filtering by file type or directory
  • Multi-step pipeline: scan → summarize → bundle → validate
  • Support for multiple output formats (JSON, Markdown, XML)

Installation

npm install -g contextpack

Or use directly:

npx contextpack

Quick Start

Basic Usage

contextpack scan ./src

Generates a context bundle from your src directory.

With Options

contextpack scan ./src --output context.json --format json

Filter by File Type

contextpack scan ./src --include "*.js,*.ts" --exclude "*.test.js"

Full Pipeline

contextpack analyze ./src --summarize --validate --output bundle.md

Common Commands

Command Description
contextpack scan <path> Analyze directory structure
contextpack summarize <path> Generate file summaries
contextpack bundle <path> Create context bundle
contextpack validate <file> Validate bundle integrity

Output Formats

  • JSON — Structured data for programmatic use
  • Markdown — Human-readable format
  • XML — Integration with other tools

FAQ

Q: How much does it reduce token usage?
A: Typically 40-60% reduction through smart summarization and deduplication.

Q: Can I exclude node_modules and build files?
A: Yes, use --exclude "node_modules,dist,build" or create a .contextpackignore file.

Q: What file types are supported?
A: All text-based files. Binary files are skipped automatically.

Q: Can I use this in CI/CD?
A: Yes, it's designed for automation. Use --json for machine-readable output.

Q: How do I customize what gets included?
A: Use .contextpackignore in your project root (similar to .gitignore).


Built with AI by Craftpipe
Support: support@heijnesdigital.com

Pro Features

Upgrade to Pro for:

  • html report
  • watch mode
  • config file

Get it at: https://craftpipe.gumroad.com

Set PRO_LICENSE=<your-key> to unlock.