DEV Community

Arsen Apostolov
Arsen Apostolov

Posted on

I’m sharing my LLM Code Lens Python package: My Secret Weapon for AI-Powered Coding

Hey everyone,

I want to share my tool that has completely transformed how I work with AI assistants. If you're tired of writing endless, complex prompts and struggling to get precise code insights, this is for you.

The Problem

Working with large language models like ChatGPT, Claude, or Mistral always felt like a communication battle. How do you explain an entire project's context in a single prompt?

My Solution: LLM Code Lens

I built a simple, powerful package that generates a comprehensive project context file in seconds.

Go to the output dir:

Image description

Preview the analysis.txt It contains summary of your codebase - imports, functions, documentation etc so that LLMs can have pretty good context.

analysis.txt

Preview the full.txt It contains your codebase aggregated in a file. Great for smaller projects (bellow 10K lines of code based on my experience).

Image description

How to Use It

  1. Install the package
pip install llm-code-lens
Enter fullscreen mode Exit fullscreen mode
  1. Generate project context
# Create condensed description of the project. Sufficient for big projects to provide context to LLMs.
# Generates analysis.txt in the output folder. Default folder: .codelens
llmcl

# On top of the analysis.txt it generates all the codebase in full.txt so that LLM can see all your projects. The output files are divided into 100K tokens file so that they can fit in any LLM including local Llama3.3 70B
llmcl --full
Enter fullscreen mode Exit fullscreen mode
  1. Get context files in .codelens/
  2. analysis.txt
  3. analysis.json

  4. Paste these directly into your AI assistant

The prompt
Image description

Immediate result
Image description

Instant Efficiency!

No more:

  • Writing 500-word explanations
  • Struggling to provide context
  • Wasting time on prompt engineering

Just pure, efficient code insights.

My Personal Experience

This tool has been an essential part of my daily coding routine for months. It has significantly improved my development performance.

Your Turn

🚀 Star the Project on GitHub

Try it. Love it. Share it.

Hope it helps you as much as it's helped me.

Cheers,
Arsen


Let's Connect! 🤝

  • 💼 Connect with me on LinkedIn
  • 🎮 Join our Random42 community on Discord - AI news, Success stories, Use cases and Support for your project!
  • 📝 Follow my tech journey on Dev.to

Top comments (0)