ai-digest  by khromov

CLI tool for code aggregation into a single Markdown file

created 1 year ago
610 stars

Top 54.6% on sourcepulse

GitHubView on GitHub
Project Summary

This CLI tool aggregates codebases into a single Markdown file, streamlining the process for AI-assisted code analysis with tools like Claude Projects and custom ChatGPTs. It targets developers seeking to provide comprehensive context to large language models for tasks such as code review, debugging, and understanding complex projects.

How It Works

The tool recursively scans a specified directory, excluding common build artifacts and configuration files using default or custom ignore patterns. It then concatenates the content of all included files into a single Markdown document. Options for whitespace removal (excluding whitespace-sensitive languages) and including binary/SVG file type indicators are available to optimize token usage for AI models.

Quick Start & Requirements

  • Primary install / run command: npx ai-digest
  • Prerequisites: Node.js (for npx)
  • Links: Official Docs (implied by README structure)

Highlighted Details

  • Aggregates entire codebases into a single Markdown file.
  • Supports custom ignore patterns via .aidigestignore files.
  • Offers whitespace removal to reduce token count for AI models.
  • Handles binary and SVG files by noting their type.

Maintenance & Community

  • Contributions are welcome via Pull Requests.

Licensing & Compatibility

  • License: MIT License
  • Compatibility: Permissive, suitable for commercial use and integration with closed-source projects.

Limitations & Caveats

The tool's effectiveness is dependent on the AI model's ability to parse and interpret the aggregated Markdown, especially for very large codebases. Whitespace removal is disabled for Python and YAML to preserve code structure.

Health Check
Last commit

3 weeks ago

Responsiveness

1 day

Pull Requests (30d)
7
Issues (30d)
2
Star History
103 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.