LLM Context logo

LLM Context

by cyberchitta

LLM Context helps developers inject relevant content from code/text projects into Large Language Model chat interfaces. It leverages `.gitignore` patterns for smart file selection and provides both a streamlined clipboard workflow and direct LLM integration through the Model Context Protocol (MCP).

View on GitHub

Last updated: N/A

What is LLM Context?

LLM Context is a command-line tool and library designed to facilitate the integration of project-specific context into Large Language Model (LLM) interactions. It automates the process of selecting relevant files, generating context snippets, and injecting them into LLM chat interfaces, enhancing the LLM's understanding of the project.

How to use LLM Context?

Install LLM Context using uv tool install "llm-context>=0.3.0". Initialize your project with lc-init. Select files using lc-sel-files. Generate context with lc-context and paste it into your LLM chat interface. Use lc-clip-files to process file requests from the LLM.

Key features of LLM Context

  • Smart file selection using .gitignore patterns

  • Multiple rule-based profiles for different use cases

  • Direct LLM integration via Model Context Protocol (MCP)

  • Clipboard workflow for any LLM chat interface

  • Code Navigation Features: Smart Code Outlines & Definition Implementation Extraction

Use cases of LLM Context

  • Enhancing LLM understanding of code repositories

  • Providing context for text/markdown/html document collections

  • Integrating project knowledge into Claude Desktop via MCP

  • Improving the accuracy and relevance of LLM responses in development tasks

FAQ from LLM Context

What is MCP?

MCP stands for Model Context Protocol, a method for direct integration with LLMs like Claude Desktop.

How does LLM Context handle large projects?

LLM Context is optimized for projects that fit within an LLM's context window. Large project support is in development.

What are system rules?

System rules (prefixed with 'lc-') provide default functionality for file selection and context generation.

How do I create custom rules?

User-defined rules can be created independently or extend existing rules to customize context generation.

What if updates overwrite my configuration files?

Configuration files prefixed with lc- may be overwritten during updates. It is recommended all configuration files be version controlled.