Codebase Digest banner
kamilstanuch kamilstanuch

Codebase Digest

AI community

Description

πŸ—œοΈ Codebase-digest is your AI-friendly codebase packer and analyzer. Features 60+ coding prompts and generates structured overviews with metrics. Ideal for feeding projects to LLMs like GPT-4, Claude, PaLM, and Gemini for code analysis and understanding.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Codebase Digest

[![PyPI version](https://badge.fury.io/py/codebase-digest.svg)](https://badge.fury.io/py/codebase-digest) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Codebase Digest is a command-line tool written in Python that helps you analyze and understand your codebase. It provides a structured overview of your project's directory structure, file sizes, token counts, and even consolidates the content of all text-based files into a single output for easy analysis with Large Language Models (LLMs).

![Codebase Digest in action](codebase-digest.gif)

Table of Contents

Features

  • πŸ“Š Directory Tree Visualization: Generate a hierarchical view of your project structure
  • πŸ“ˆ Codebase Statistics: Calculate total files, directories, code size, and token counts
  • πŸ“„ File Content Consolidation: Combine all text-based files into a single output
  • 🚫 Flexible Ignore System: Support for custom patterns, defaults, and .gitignore files
  • 🎨 Multiple Output Formats: Choose between text, JSON, Markdown, XML, or HTML
  • 🌈 Colored Console Output: Visually appealing and informative summaries
  • 🧠 LLM Analysis Support: Comprehensive prompt library for in-depth codebase analysis

Installation

Via pip (Recommended)

pip install codebase-digest

From source

git clone https://github.com/kamilstanuch/codebase-digest.git
cd codebase-digest
pip install -r requirements.txt

Usage

Basic usage:

cdigest [path_to_directory] [options]

Examples:

  1. Analyze a project with default settings:

    cdigest /path/to/my_project
  2. Analyze wi