codebase-digest  by kamilstanuch

CLI tool for LLM-assisted codebase analysis

Created 1 year ago
304 stars

Top 88.0% 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

11 months ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Travis Fischer Travis Fischer(Founder of Agentic), and
6 more.

AlphaCodium by Codium-ai

0.1%
4k
Code generation research paper implementation
Created 1 year ago
Updated 9 months ago
Starred by David Cournapeau David Cournapeau(Author of scikit-learn), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

repomix by yamadashy

0.6%
19k
CLI tool to pack codebases into AI-friendly formats for LLMs
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.