Skip to main content

CLI tool for creating code snapshots with configurable settings

Project description

LLM-Auto-Context

A CLI tool for generating code snapshots for LLM context windows.

Python Version License

Installation

Using UV (recommended):

uv pip install llm-auto-context

Using pip:

pip install llm-auto-context

Usage

Basic usage:

llm_auto_context

This will use the default config file .codesnapshot.json in your current directory.

Configuration

Create a .codesnapshot.json file in your project root:

{
    "directories": ["src", "lib"],
    "output_file": "code_snapshot.md",
    "include_extensions": [".py", ".js", ".ts"],
    "exclude_dirs": ["node_modules", ".git", "build"],
    "exclude_files": ["secrets.env"]
}

CLI Options

  • --config: Path to config file (default: .codesnapshot.json)
  • -d, --directory: Override directories to scan (can be used multiple times)
  • -o, --output: Override output file path
  • --include: Override file extensions to include (can be used multiple times)
  • --exclude-dir: Additional directories to exclude (can be used multiple times)
  • --exclude-file: Additional files to exclude (can be used multiple times)

Example:

llm_auto_context -d src -d lib -o snapshot.md --exclude-dir tests

Development

  1. Clone the repository
  2. Create a virtual environment:
uv venv
  1. Install dependencies:
uv pip install -e ".[dev]"
  1. Run tests:
pytest

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_auto_context-1.1.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_auto_context-1.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file llm_auto_context-1.1.0.tar.gz.

File metadata

  • Download URL: llm_auto_context-1.1.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.4.28

File hashes

Hashes for llm_auto_context-1.1.0.tar.gz
Algorithm Hash digest
SHA256 30568669a62a426277b3aea2d1b0ac0576f07cc3febb3476bed80309a5531d08
MD5 bf412ea72a4352500752f458dd0658e6
BLAKE2b-256 6f505191b38b2bac35fa446f72698343f5febf6e1ae0ffa912796591e70cb2e0

See more details on using hashes here.

File details

Details for the file llm_auto_context-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_auto_context-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcbbc8ad24e8ac5b1c9d61f725c5c67f03e634ac07dc38fec6a813a340c770b0
MD5 50fc0ee508e10c868a45a540717ecfc7
BLAKE2b-256 31dbf23c455f060ecdc9882b1b0d22e4bebd9a0f40d064b31be3b853acca49c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page