@m0xb/context-builder
v0.3.2
Published
CLI tool for building context
Downloads
857
Readme
context-builder
Developing
- Uses Bun as the package manager and dev runtime (Node is still the runtime for end users)
bun installto install dependencies
Running
% bin/context-builder.js --help
Usage: context-builder [options] <directory>
Gather file contents and output to stdout or clipboard
Arguments:
directory Directory to scan
Options:
-r, --recursive Recursively scan subdirectories (default: false)
-g, --glob <pattern> Glob pattern to filter files (e.g., "*.js")
-c, --clipboard Copy output to clipboard instead of stdout (default: false)
-h, --help display help for commandNote: Automatically ignores node_modules/ and .git/ directories.
Examples
The below commands assume this package is installed and available on your path.
npm install -g @m0xb/context-builder- global installation, pulls down the latest published versionbun link- for local development (symlinks to your local code)
# Output to stdout (default)
context-builder . -r -g "*.js"
# Pipe to file
context-builder ./src -r > context.txt
# Copy to clipboard
context-builder ./src -r -g "*.ts" --clipboard
# Pipe to another command
context-builder . -g "*.json" | wc -l