@simpleplatform/contextualizer
v1.0.7
Published
Effortlessly package your project's source code into a single, context-rich file for LLMs.
Maintainers
Readme
Contextualizer
Effortlessly package your project's source code into a single, context-rich file for LLMs. This CLI tool intelligently scans your directories, filters out unnecessary files, and consolidates the relevant code, making it easy to share your project's context with AI models.
Features
- 🚀 Go-based: Fast, native performance with no runtime dependencies for consumers.
- 📦 NPM Distribution: Installs easily via
npmornpxwithout requiring Go on the system. - 🖥️ Rich TUI: Interactive directory selection using Bubble Tea.
- ⚙️ Configurable: robust ignore patterns and output customization via
contextualizer.json. - 🧠 Smart Defaults: Pre-configured to ignore common artifacts (
node_modules, lockfiles, binaries).
Installation
Using NPM / NPX (Recommended)
You don't need Go installed. The package automatically downloads the correct binary for your OS/Arch.
# Run one-off
npx @simpleplatform/contextualizer
# Install globally
npm install -g @simpleplatform/contextualizer
# Install as dev dependency
npm install -D @simpleplatform/contextualizerBuilding from Source
If you prefer to build from source:
git clone https://github.com/simple-platform/simple-tools.git
cd simple-tools/tools/contextualizer
go build -o contextualizer ./cmd/contextualizerUsage
1. Initialize
Generate a contextualizer.json file in your project root with default ignore patterns:
contextualizer --init2. Run
Simply run the command to start the interactive UI:
contextualizer- Select Directories: Use
Spaceto toggle directories to include. - Confirm: Press
Enterto proceed. - Output Mode: Choose between
Multiple Files(default) orSingle File.
The tool will process the files and output them to .context/.
Configuration
The contextualizer.json file allows for extensive customization:
{
"outputDir": ".context",
"topLevelDirs": ["src", "pkg"],
"ignore": [
"node_modules/",
"dist/",
"*.log",
"secret.txt"
]
}License
Apache 2.0
