macOS
brew install code2promptlocal Homebrew formula metadata
brew
CLI tool to convert your codebase into a single LLM prompt. Version 4.2.0 via Homebrew; verified 2026-06-22.
install
brew install code2promptlocal Homebrew formula metadata
nix profile install nixpkgs#code2promptnixpkgs package indexes · pkgs/by-name/co/code2prompt/package.nix · source: api.github.com
overview
CLI tool to convert your codebase into a single LLM prompt
history
Code2Prompt is a Rust-based CLI and companion ecosystem for turning a source tree into structured context for large language models. Its niche is the practical developer workflow of packaging repository files, source trees, token counts, templates, and git context into one promptable artifact.
The public GitHub repository was created on 2024-03-09, and the first tagged 1.0.0 release followed on 2024-03-16. The official README describes the project as a CLI for converting a codebase into a single LLM prompt, while later project materials frame it as a broader context-engineering tool with a Rust core library, CLI/TUI, Python SDK, and MCP server.
By the 2025 release line, the project had moved beyond a single command into a small tooling family around local code ingestion: respecting ignore rules, generating source trees, applying Handlebars templates, counting tokens, reading formats such as notebooks and CSV, and including git diffs or logs.
The official README documents Cargo, Homebrew, binary-release, and Python SDK installation paths, and the input package facts also list Homebrew and Nix packaging. That distribution pattern is typical for Rust CLIs that serve both terminal users and automation workflows.
The repository metadata gathered from GitHub showed several thousand stars and hundreds of forks by the enrichment date, which is notable for a project started in 2024 and consistent with the rapid spread of LLM-context utilities among developers.
Typical use is running `code2prompt .` against a project directory, optionally writing to a file or clipboard, filtering paths, using a `.c2pconfig` TOML file, and selecting output formats or tokenizers. The official docs state that Code2Prompt looks for `.c2pconfig` in the current working directory and applies its rules automatically.
The project also targets agentic and programmatic usage: the README describes a Python SDK and local MCP server alongside the human-oriented CLI and TUI.
Code2Prompt is a representative package from the post-2023 wave of small, fast CLIs built to bridge traditional repositories and LLM context windows. Package maintainers care about it because it sits at the intersection of Rust CLI distribution, language-model workflow automation, and cross-registry publishing through Cargo, Homebrew, Nix, PyPI bindings, and binary releases.
Its significance is less about a long legacy and more about crystallizing a new packaging pattern: a native CLI with a core library, optional SDK bindings, and editor or agent-adjacent surfaces.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
.c2pconfigexecutables
| Command | Kind | Exposure | Note |
|---|---|---|---|
code2prompt | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/mufeedvh/code2prompt
install metadata
| Package key | brew:code2prompt |
|---|---|
| Version | 4.2.0 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/code2prompt |
| Homepage | https://code2prompt.dev/ |
| Repository | https://github.com/mufeedvh/code2prompt |
| Upstream docs | https://code2prompt.dev/docs/how_to/cli |
| License | MIT |
| Source archive | https://github.com/mufeedvh/code2prompt/archive/refs/tags/v4.2.0.tar.gz |
| Last updated | 2026-06-22T14:03:03-07:00 |
| Pulse | updated |
| Dependencies | openssl@3 |
| Build dependencies | pkgconf, rust |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | code2prompt |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
code2prompt
nix profile install nixpkgs#code2promptsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.