CLI Tool & Context Engineering Platform
7.3k 2026-04-30
mufeedvh/code2prompt
A powerful CLI tool and ecosystem to convert entire codebases into structured, token-counted prompts for Large Language Models.
Core Features
Interactive Terminal User Interface (TUI)
Smart filtering with .gitignore support
Flexible prompt templating
Automatic code processing for any codebase size
Token usage tracking
Quick Start
cargo install code2promptDetailed Introduction
Code2Prompt is an advanced context engineering solution designed to streamline the process of preparing codebases for Large Language Models. It transforms complex code repositories into single, well-structured LLM prompts, respecting `.gitignore` rules and offering features like token counting and flexible templating. Available as a CLI tool, Python SDK, and a Rust core library, it empowers developers and AI agents to efficiently ingest code context, enhancing productivity for tasks ranging from manual prompt creation to building sophisticated RAG pipelines and agentic applications.