Skip to content

YounesBensafia/DevLens

Repository files navigation

DevLens

Illuminate your codebase with AI-powered analysis

PyPI version Python License: MIT GitHub Stars

Installation · Features · Usage · Contributing · License


Overview

DevLens is a powerful CLI tool that delivers comprehensive insights into your codebase. It helps developers and teams understand, document, and optimize their software projects — powered by AI through Groq's Llama models.

Whether you need a quick project summary, AI-generated documentation, or dead code detection, DevLens has you covered.


Quick Demo


Features

AI-Powered Code Analysis

Get intelligent summaries of every file in your project

Codebase Statistics

Language breakdown, line counts, and project structure

Complete Project Insights

Total files, directories, and detailed structure visualization

Language Breakdown

See exactly how your codebase is distributed across languages

README Generator

Auto-generate professional documentation for your project

Generated Output

Clean, well-structured README tailored to your project

Dead Code Detection

Find unused functions and imports to keep your code clean

Issue Breakdown

Get a full overview of empty files and project issues


Installation

From PyPI (Recommended)

pip install devlens-tool

Using uv

uv tool install devlens-tool

From Source

git clone https://github.com/YounesBensafia/DevLens.git
cd DevLens
uv tool install .

Setup

DevLens uses Groq for AI-powered features. You'll need a free API key.

1. Get your API key from console.groq.com

2. Set the environment variable:

export GROQ_API_KEY=your_api_key_here

Tip: Add the export line to your ~/.bashrc or ~/.zshrc to make it permanent.


Usage

devlens --help

Commands

Command Description
devlens -st <PATH> Generate a comprehensive project summary — total files, lines, directories, language breakdown, and project structure
devlens -an <PATH> AI-powered analysis of each file using meta-llama/llama-4-scout-17b-16e-instruct
devlens -rd Auto-generate a professional README.md tailored to your project
devlens -deadcode <PATH> Detect unused functions and imports across the codebase

Examples

# Analyze the current directory
devlens -st .

# Get AI summaries for a specific project
devlens -an /path/to/your/project

# Generate a README for the current project
devlens -rd

# Find dead code
devlens -deadcode .

Roadmap

  • Project statistics and language breakdown
  • AI-powered file analysis
  • Automatic README generation
  • Dead code detection
  • Dependency graph visualization
  • Support for more languages in dead code detection

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License — see the LICENSE file for details.


Built by Younes Bensafia

If DevLens helps you, consider giving it a star.

About

Lost in a new codebase? This CLI tool quickly scans your repository to show language breakdown, lines of code, and structure. It detects the tech stack, maps dependencies in a clear graph, uses AI to summarize files, functions, and classes, highlights dead code, and auto-generates a professional README.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages