v0.1.0 - Initial Release
src-context
A smart, token-aware CLI for aggregating and optimizing codebases for LLM context.
src-context intelligently scans your project, grabs all the relevant files, optimizes their content, and combines them into a single, clean output perfect for pasting into any large language model.
Features
-
Clipboard Ready: Use
--clipto copy the entire output directly to your clipboard. -
Token Budgeting: Set a limit with
--token-budget <number>to guarantee the output never exceeds your model's context window. -
Smart Minification: Use a
.contextminifyfile to include a file's path but not its content, saving thousands of tokens on build artifacts or lockfiles. -
Watch Mode: Run with
--watchto automatically rebuild the context every time you save a file. -
Token Analysis: Use
--show-tokensto get a detailed breakdown of which files are the "most expensive" in your project. -
Smart Optimizations: Automatically removes unnecessary whitespace from code (but intelligently skips files like Python or YAML) to save tokens.
-
Robust Ignoring: Combines default ignores (
node_modules,.git, etc.), a custom.contextignorefile, and CLI--ignorepatterns for total control. -
Library First: Can be imported as a Node.js library for use in other projects.
-
Safe & Configurable: Handles binary files, SVGs, and lets you set a max file size with
--max-file-kb.