code2prompt
« Back to VersTracker
Description:
CLI tool to convert your codebase into a single LLM prompt
Type: Formula  |  Latest Version: 4.2.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: ai developer-tools cli llm prompt-engineering
Install: brew install code2prompt
About:
code2prompt is a command-line interface tool designed to aggregate source code from a directory into a single formatted prompt. It supports filtering by file extensions and gitignore patterns, making it ideal for feeding context into Large Language Models for code review or analysis.
Key Features:
  • Recursive directory scanning with file content concatenation
  • Gitignore and file extension filtering support
  • Token counting to ensure prompt fits model limits
  • Customizable prompt templates
Use Cases:
  • Preparing codebases for AI-driven code review or refactoring
  • Generating context-rich prompts for LLM coding assistants
  • Creating documentation based on source code analysis
Alternatives:
  • repomix – Similar functionality, often with different output formats (XML/JSON)
  • Manual copy-paste – code2prompt automates aggregation and formatting, reducing errors
License: MIT
Dependencies: openssl@3
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Dec 11, 2025 10:58pm 0 VERSION_BUMP 3c4ab077
Sep 18, 2025 11:35am 0 VERSION_BUMP 61b9aa2d
Sep 18, 2025 10:53am 0 VERSION_BUMP 6a2db4ab
Sep 16, 2025 6:23pm 0 VERSION_BUMP 8a29f70a