Skip to content

v0.1.0 - Initial Release

Choose a tag to compare

@Jisevind Jisevind released this 28 Oct 23:57
· 72 commits to main since this 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 --clip to 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 .contextminify file to include a file's path but not its content, saving thousands of tokens on build artifacts or lockfiles.

  • Watch Mode: Run with --watch to automatically rebuild the context every time you save a file.

  • Token Analysis: Use --show-tokens to 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 .contextignore file, and CLI --ignore patterns 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.