rule-based file selection with gitignore pattern matching
Intelligently selects files from repositories by applying .gitignore patterns and custom inclusion/exclusion rules defined in YAML frontmatter. The system reads rule files from .llm-context/rules/ directory, parses gitignore-style patterns, and maintains persistent selection state across sessions. Files are categorized as either full-content or outline candidates based on rule configuration, enabling selective context injection without manual file enumeration.
Unique: Combines .gitignore pattern matching with YAML-frontmatter rule files stored in .llm-context/rules/, enabling both system rules (lc-prefixed) and user-defined rules that can extend base rules. This two-tier rule system with persistent state management differentiates it from simple glob-based file pickers.
vs alternatives: More sophisticated than basic glob patterns because it respects .gitignore conventions developers already maintain, while offering rule composition and state persistence that simple file dialogs lack.
code structure outlining and definition extraction
Parses source code files to extract structural information (function/class definitions, imports, comments) and generates condensed outlines instead of full file content. Supports 40+ languages through language-specific parsers, enabling LLMs to understand codebase architecture without token-heavy full file dumps. Definitions are extracted as key-value pairs mapping symbol names to their locations, allowing LLMs to navigate code semantically.
Unique: Uses language-specific parsers (likely tree-sitter based on DeepWiki references) to extract definitions and generate outlines for 40+ languages, categorizing files as outline vs full-content candidates based on rule configuration. This enables intelligent token optimization by choosing representation granularity per file.
vs alternatives: More accurate than regex-based outline generation because it uses proper AST parsing, and more flexible than fixed-format summaries because outline depth is configurable per rule.
jinja2-based template system for context formatting
Formats selected files and extracted code structures into LLM-ready context using Jinja2 templates. The system provides default templates for common scenarios (documentation review, code refactoring) and allows custom templates to be defined in .llm-context/templates/. Templates receive context variables including file lists, outlines, definitions, and project metadata, enabling flexible output formatting for different LLM chat interfaces and prompt engineering strategies.
Unique: Provides both default templates for common LLM tasks and extensible custom template support via .llm-context/templates/, allowing users to define project-specific formatting without modifying core code. Templates receive rich context variables including file lists, outlines, and project notes.
vs alternatives: More flexible than hardcoded formatting because templates are user-customizable, and more powerful than simple string concatenation because Jinja2 enables conditional logic, loops, and filters for sophisticated context assembly.
model context protocol (mcp) server integration
Exposes llm-context functionality as an MCP server, allowing Claude and other MCP-compatible LLMs to request context generation on-demand through standardized protocol calls. The MCP server implements tools for file selection, context generation, and template rendering, enabling LLMs to interactively refine context without returning to the CLI. This creates a bidirectional integration where LLMs can request specific context based on their analysis needs.
Unique: Implements llm-context as an MCP server that exposes file selection and context generation as callable tools, enabling LLMs to request context dynamically rather than receiving static context. This bidirectional integration pattern is distinct from one-way context injection via clipboard.
vs alternatives: More interactive than clipboard-based context sharing because LLMs can request specific files or refine selections mid-conversation, and more integrated than manual CLI usage because the LLM stays in a single conversation context.
clipboard-based context export with format options
Generates formatted context and copies it directly to the system clipboard, enabling one-click context injection into any LLM chat interface. Supports multiple output formats (markdown, plain text, structured JSON) and integrates with the template system to produce chat-ready context. The clipboard integration bypasses the need for file uploads or API integrations, making it compatible with any LLM interface that accepts pasted text.
Unique: Provides direct clipboard integration as an alternative to MCP, enabling context export to any LLM interface without requiring API keys or special client support. Supports multiple output formats through the template system, making it adaptable to different chat interface preferences.
vs alternatives: More accessible than MCP because it works with any LLM chat interface (web, mobile, etc.), and faster than manual file selection because it automates the entire context preparation and copying workflow.
project notes and user notes management
Stores project-level and user-level notes in .llm-context/project-notes.md and .llm-context/user-notes.md respectively, which are automatically included in generated context. These notes provide persistent metadata about the project (architecture decisions, conventions, known issues) and user preferences (preferred coding style, analysis focus areas) that inform LLM understanding without requiring manual re-entry per session. Notes are treated as first-class context components alongside code files.
Unique: Treats project and user notes as first-class context components that are automatically included in every context generation, rather than optional metadata. This enables persistent project knowledge to be maintained separately from code files while remaining tightly integrated into the context pipeline.
vs alternatives: More persistent than per-session prompting because notes are stored in the project and automatically included, and more discoverable than external documentation because notes are co-located with context configuration in .llm-context/.
execution environment with context state persistence
Manages the execution context through a ContextSpec object that tracks project configuration, rule selections, and file state across CLI invocations. The system persists state in .llm-context/state.json or equivalent, enabling users to save context configurations and resume them without re-specifying rules or file selections. The execution environment coordinates between file selection, context generation, and output integration, providing a unified interface for context management.
Unique: Implements a ContextSpec-based execution environment that persists state between CLI invocations, enabling saved context configurations and resumable workflows. This architectural pattern treats context as a first-class managed entity rather than ephemeral CLI output.
vs alternatives: More sophisticated than stateless CLI tools because it enables configuration reuse and state tracking, and more flexible than hardcoded configurations because state can be modified and persisted dynamically.
multi-language code parsing and highlighting
Parses and highlights source code in 40+ languages using language-specific syntax rules, enabling LLMs to understand code structure and semantics beyond plain text. The system applies syntax highlighting markers (markdown code blocks with language identifiers, or inline markers) to code snippets, improving LLM comprehension of language-specific constructs. Language detection is automatic based on file extension, with fallback to user specification.
Unique: Supports 40+ languages through language-specific parsers integrated into the context generation pipeline, automatically detecting language from file extension and applying appropriate highlighting. This enables consistent code presentation across polyglot projects.
vs alternatives: More comprehensive than generic syntax highlighting because it uses language-specific parsers for accurate structure understanding, and more integrated than external code formatters because highlighting is applied during context generation.
+2 more capabilities