codefetch  by regenrek

CLI tool to convert code to Markdown for LLMs

created 6 months ago
326 stars

Top 84.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This tool transforms local codebases into Markdown files, ideal for feeding into Large Language Models (LLMs) for analysis, summarization, or code generation tasks. It's designed for developers and researchers working with AI code assistants or needing to quickly represent project structures for LLM consumption.

How It Works

Codefetch recursively scans a specified directory, respecting .gitignore and .codefetchignore files. It then converts the collected code files into a single Markdown document, optionally including line numbers and a project directory tree. Users can filter by file extensions, include/exclude specific files or directories, and select tokenization methods compatible with various LLM models.

Quick Start & Requirements

Highlighted Details

  • Supports multiple token encoders (simple, p50k, o200k, cl100k) for LLM compatibility.
  • Offers token limiting strategies (sequential, truncated) to manage output size.
  • Allows custom prompts and integrates with AI tools like Cursor.
  • Can generate a visual project tree structure within the Markdown output.

Maintenance & Community

  • Developed by regenrek.
  • Links to X/Twitter (@kregenrek) and Bluesky (@kevinkern.dev) provided.
  • Inspired by codetie and sitefetch CLIs.

Licensing & Compatibility

  • The README does not explicitly state a license.

Limitations & Caveats

The project's license is not specified, which may impact commercial use or integration into closed-source projects.

Health Check
Last commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
9
Issues (30d)
3
Star History
67 stars in the last 90 days

Explore Similar Projects

Starred by David Cournapeau David Cournapeau(Author of scikit-learn), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
6 more.

repomix by yamadashy

0.8%
18k
CLI tool to pack codebases into AI-friendly formats for LLMs
created 1 year ago
updated 5 days ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Anil Dash Anil Dash(Former CEO of Glitch), and
13 more.

cline by cline

0.8%
48k
VS Code extension for autonomous coding agent
created 1 year ago
updated 1 day ago
Feedback? Help us improve.