regenrek/codefetch
Turn code into Markdown for LLMs with one simple terminal command
Intelligently extracts and formats code files from repositories or local directories into structured Markdown, respecting .gitignore patterns and supporting GitHub/GitLab/Bitbucket. Includes token counting across multiple LLM encodings (GPT-4, Claude, o200k), smart filtering with glob patterns, and a direct "open" command that copies formatted code to clipboard and launches ChatGPT/Gemini/Claude in the browser. Built as both CLI and Node.js SDK with GitHub API integration for fast repo fetching and optional git clone fallback.
420 stars and 5,097 monthly downloads. Available on npm.
Stars
420
Forks
21
Language
TypeScript
License
MIT
Category
Last pushed
Dec 07, 2025
Monthly downloads
5,097
Commits (30d)
0
Dependencies
7
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/regenrek/codefetch"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
ogre-run/miniogre
Automate the generation of infrastructure and documentation files from source code
JackBekket/Reflexia
Autodoc project, aimed to autonomously generating documentation for any code repository and...
czottmann/interfazzle
A Swift CLI tool for building simple Markdown docs for a package's public interface from its...
0x-kys/flawa
Flawa generates Markdown docs from code files, so you don’t have to explain everything.