codebase-digest  by kamilstanuch

CLI tool for LLM-assisted codebase analysis

created 10 months ago
282 stars

Top 93.5% on sourcepulse

GitHubView on GitHub
Project Summary

Codebase-digest is a Python CLI tool designed to analyze and package codebases for Large Language Models (LLMs). It helps developers quickly understand project structure, statistics, and consolidated file content, making it ideal for feeding into LLMs for tasks like code analysis, documentation generation, and security assessments.

How It Works

The tool traverses a specified directory, generating a hierarchical tree view of files and directories. It calculates statistics like total files, directories, code size, and token counts. A key feature is its ability to consolidate all text-based file content into a single output, optionally excluding specific files or directories via a flexible ignore system that supports custom patterns, .gitignore, and a .cdigestignore file.

Quick Start & Requirements

  • Install via pip: pip install codebase-digest
  • Usage: cdigest [path_to_directory] [options]
  • Requirements: Python. No specific version mentioned, but typically Python 3.7+ is a safe assumption for modern CLI tools.
  • Documentation: https://github.com/kamilstanuch/codebase-digest

Highlighted Details

  • Supports over 60 AI-friendly coding prompts for in-depth analysis.
  • Offers multiple output formats: text, JSON, Markdown, XML, HTML.
  • Includes a comprehensive default ignore list covering common development artifacts.
  • Can copy output directly to the clipboard.

Maintenance & Community

The project is maintained by Kamil Stanuch. Contributions are welcome via Pull Requests.

Licensing & Compatibility

Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The README does not specify Python version requirements or provide performance benchmarks. The extensive prompt library might require careful selection and adaptation for specific LLM use cases.

Health Check
Last commit

9 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
60 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.