code2prompt

mufeedvh/code2prompt

Code2Prompt is a CLI tool that converts an entire codebase into a single structured LLM prompt, including a source tree, prompt templating, and token counting. It handles secure file traversal, respects .gitignore rules, and supports glob-based include/exclude filtering, saving you from manually copying context for tools like ChatGPT. It suits developers building AI agents, automation scripts, or RAG pipelines, and is available as a Rust core, CLI, Python SDK, and MCP server.

CLI ToolRust MIT
Visit websiteGitHub← Back to tool directory

Installation

brew install code2prompt

Related topics

Similar tools