CLI tool to convert code to Markdown for LLMs
Top 84.8% on sourcepulse
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
npx codefetch
.Highlighted Details
simple
, p50k
, o200k
, cl100k
) for LLM compatibility.sequential
, truncated
) to manage output size.Maintenance & Community
codetie
and sitefetch
CLIs.Licensing & Compatibility
Limitations & Caveats
The project's license is not specified, which may impact commercial use or integration into closed-source projects.
1 week ago
1 week